19 if (is_array($value)) {
20 $value =
new Matrix($value);
23 if (is_object($value) && ($value instanceof
Matrix)) {
25 } elseif (is_numeric($value)) {
29 throw new Exception(
'Invalid argument for subtraction');
42 $this->matrix[
$row][$column] -= $value;
subtractScalar($value)
Execute the subtraction for a scalar.
subtractMatrix(Matrix $value)
Execute the subtraction for a matrix.
$rows
Number of rows in the matrix.
execute($value)
Execute the subtraction.
$columns
Number of columns in the matrix.
getValue(int $row, int $column)
Return a value from this matrix, from the "cell" identified by the row and column numbers Note that r...
validateMatchingDimensions(Matrix $matrix)
Compare the dimensions of the matrices being operated on to see if they are valid for addition/subtra...
Class for the creating "special" Matrices.