Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250620) (7d9030acd6e)
Matrix\Operators\Operator Class Reference
Inheritance diagram for Matrix\Operators\Operator:
Matrix\Operators\Addition Matrix\Operators\DirectSum Matrix\Operators\Multiplication Matrix\Operators\Subtraction Matrix\Operators\Division

Public Member Functions

 __construct (Matrix $matrix)
 Create an new handler object for the operation.
 
 result ()
 Return the result of the operation.
 

Protected Member Functions

 validateMatchingDimensions (Matrix $matrix)
 Compare the dimensions of the matrices being operated on to see if they are valid for addition/subtraction.
 
 validateReflectingDimensions (Matrix $matrix)
 Compare the dimensions of the matrices being operated on to see if they are valid for multiplication/division.
 

Protected Attributes

 $columns
 Number of columns in the matrix.
 
 $matrix
 
 $rows
 Number of rows in the matrix.
 

Constructor & Destructor Documentation

◆ __construct()

Matrix\Operators\Operator::__construct ( Matrix $matrix)

Create an new handler object for the operation.

Parameters
Matrix$matrixThe base Matrix object on which the operation will be performed

Member Function Documentation

◆ result()

Matrix\Operators\Operator::result ( )

Return the result of the operation.

Return values
Matrix

◆ validateMatchingDimensions()

Matrix\Operators\Operator::validateMatchingDimensions ( Matrix $matrix)
protected

Compare the dimensions of the matrices being operated on to see if they are valid for addition/subtraction.

Parameters
Matrix$matrixThe second Matrix object on which the operation will be performed
Exceptions
Exception

◆ validateReflectingDimensions()

Matrix\Operators\Operator::validateReflectingDimensions ( Matrix $matrix)
protected

Compare the dimensions of the matrices being operated on to see if they are valid for multiplication/division.

Parameters
Matrix$matrixThe second Matrix object on which the operation will be performed
Exceptions
Exception

The documentation for this class was generated from the following file: