/var/www/vhosts/ihelp.ro/httpdocs/vendor/markbaker/matrix/classes/src/Operators
NameSizeModeActions
Addition.php20480644editdlrm
DirectSum.php19190644editdlrm
Division.php10050644editdlrm
Multiplication.php29160644editdlrm
Operator.php20010644editdlrm
Subtraction.php21120644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/markbaker/matrix/classes/src/Operators/Operator.php (2001B)
rows = $matrix->rows; $this->columns = $matrix->columns; $this->matrix = $matrix->toArray(); } /** * Compare the dimensions of the matrices being operated on to see if they are valid for addition/subtraction * * @param Matrix $matrix The second Matrix object on which the operation will be performed * @throws Exception */ protected function validateMatchingDimensions(Matrix $matrix): void { if (($this->rows != $matrix->rows) || ($this->columns != $matrix->columns)) { throw new Exception('Matrices have mismatched dimensions'); } } /** * Compare the dimensions of the matrices being operated on to see if they are valid for multiplication/division * * @param Matrix $matrix The second Matrix object on which the operation will be performed * @throws Exception */ protected function validateReflectingDimensions(Matrix $matrix): void { if ($this->columns != $matrix->rows) { throw new Exception('Matrices have mismatched dimensions'); } } /** * Return the result of the operation * * @return Matrix */ public function result(): Matrix { return new Matrix($this->matrix); } }