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);
An exception for terminatinating execution or to throw for unit testing.
validateMatchingDimensions(Matrix $matrix)
Compare the dimensions of the matrices being operated on to see if they are valid for addition/subtra...
result()
Return the result of the operation.
__construct(Matrix $matrix)
Create an new handler object for the operation.
validateReflectingDimensions(Matrix $matrix)
Compare the dimensions of the matrices being operated on to see if they are valid for multiplication/...
$rows
Number of rows in the matrix.
$columns
Number of columns in the matrix.
Class for the creating "special" Matrices.