38 $this->rows = $matrix->
rows;
39 $this->columns = $matrix->
columns;
40 $this->matrix = $matrix->
toArray();
51 if (($this->rows != $matrix->
rows) || ($this->columns != $matrix->
columns)) {
52 throw new Exception(
'Matrices have mismatched dimensions');
64 if ($this->columns != $matrix->
rows) {
65 throw new Exception(
'Matrices have mismatched dimensions');
76 return new Matrix($this->matrix);
__construct(Matrix $matrix)
Create an new handler object for the operation.
rows()
Returns a Generator that will yield each row of the matrix in turn as a vector matrix or the value of...
$rows
Number of rows in the matrix.
$columns
Number of columns in the matrix.
result()
Return the result of the operation.
columns()
Returns a Generator that will yield each column of the matrix in turn as a vector matrix or the value...
toArray()
Return the matrix as a 2-dimensional array.
validateMatchingDimensions(Matrix $matrix)
Compare the dimensions of the matrices being operated on to see if they are valid for addition/subtra...
validateReflectingDimensions(Matrix $matrix)
Compare the dimensions of the matrices being operated on to see if they are valid for multiplication/...
Class for the creating "special" Matrices.