\Matrix\OperatorsDivision

Summary

Methods
Properties
Constants
execute()
__construct()
result()
No public properties found
No constants found
multiplyScalar()
multiplyMatrix()
validateMatchingDimensions()
validateReflectingDimensions()
$matrix
$rows
$columns
N/A
No private methods found
No private properties found
N/A

Properties

$matrix

$matrix : 

Stored internally as a 2-dimension array of values

Type

$rows

$rows : 

Number of rows in the matrix

Type

$columns

$columns : 

Number of columns in the matrix

Type

Methods

execute()

execute(mixed  $value) : $this

Execute the division

Parameters

mixed $value

The matrix or numeric value to divide the current base value by

Throws

\Matrix\Exception

If the provided argument is not appropriate for the operation

Returns

$this —

The operation object, allowing multiple divisions to be chained

__construct()

__construct(\Matrix\Matrix  $matrix) 

Create an new handler object for the operation

Parameters

\Matrix\Matrix $matrix

The base Matrix object on which the operation will be performed

result()

result() : \Matrix\Matrix

Return the result of the operation

Returns

\Matrix\Matrix

multiplyScalar()

multiplyScalar(mixed  $value) : $this

Execute the multiplication for a scalar

Parameters

mixed $value

The numeric value to multiply with the current base value

Returns

$this —

The operation object, allowing multiple mutiplications to be chained

multiplyMatrix()

multiplyMatrix(\Matrix\Matrix  $value) : $this

Execute the multiplication for a matrix

Parameters

\Matrix\Matrix $value

The numeric value to multiply with the current base value

Throws

\Matrix\Exception

If the provided argument is not appropriate for the operation

Returns

$this —

The operation object, allowing multiple mutiplications to be chained

validateMatchingDimensions()

validateMatchingDimensions(\Matrix\Matrix  $matrix) 

Compare the dimensions of the matrices being operated on to see if they are valid for addition/subtraction

Parameters

\Matrix\Matrix $matrix

The second Matrix object on which the operation will be performed

Throws

\Matrix\Exception

validateReflectingDimensions()

validateReflectingDimensions(\Matrix\Matrix  $matrix) 

Compare the dimensions of the matrices being operated on to see if they are valid for multiplication/division

Parameters

\Matrix\Matrix $matrix

The second Matrix object on which the operation will be performed

Throws

\Matrix\Exception