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

Public Member Functions

 execute ($value)
 
 result ()
 Return the result of the operation.
 

Protected Member Functions

 addMatrix (Matrix $value)
 Execute the addition for a matrix.
 
 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/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.
 

Member Function Documentation

◆ addMatrix()

Matrix\Operators\Addition::addMatrix ( Matrix $value)
protected

Execute the addition for a matrix.

Parameters
Matrix$valueThe numeric value to add to the current base value
Return values
$thisThe operation object, allowing multiple additions to be chained
Exceptions
ExceptionIf the provided argument is not appropriate for the operation

◆ addScalar()

Matrix\Operators\Addition::addScalar ( $value)
protected

Execute the addition for a scalar.

Parameters
mixed$valueThe numeric value to add to the current base value
Return values
$thisThe operation object, allowing multiple additions to be chained

◆ result()

Matrix\Operators\Operator::result ( )
inherited

Return the result of the operation.

Return values
Matrix

◆ validateMatchingDimensions()

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

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)
protectedinherited

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: