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 addition');
42 $this->matrix[
$row][$column] += $value;
$rows
Number of rows in the matrix.
$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...
addScalar($value)
Execute the addition for a scalar.
validateMatchingDimensions(Matrix $matrix)
Compare the dimensions of the matrices being operated on to see if they are valid for addition/subtra...
execute($value)
Execute the addition.
addMatrix(Matrix $value)
Execute the addition for a matrix.
Class for the creating "special" Matrices.