\Matrix\OperatorsOperator

Summary

Methods
Properties
Constants
__construct()
result()
No public properties found
No constants found
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

$rows

$rows

Number of rows in the matrix

$columns

$columns

Number of columns in the matrix

Methods

__construct()

__construct(\Matrix\Matrix  $matrix) : mixed

Create an new handler object for the operation

Parameters

\Matrix\Matrix $matrix

The base Matrix object on which the operation will be performed

Returns

mixed —

result()

result() : \Matrix\Matrix

Return the result of the operation

Returns

\Matrix\Matrix —

validateMatchingDimensions()

validateMatchingDimensions(\Matrix\Matrix  $matrix) : void

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) : void

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