Definition at line 8 of file Addition.php.
◆ addMatrix()
Matrix\Operators\Addition::addMatrix |
( |
Matrix |
$value | ) |
|
|
protected |
◆ addScalar()
Matrix\Operators\Addition::addScalar |
( |
|
$value | ) |
|
|
protected |
◆ execute()
Matrix\Operators\Addition::execute |
( |
|
$value | ) |
|
Execute the addition.
- Parameters
-
mixed | $value | The matrix or numeric value to add to the current base value |
- Exceptions
-
Exception | If the provided argument is not appropriate for the operation |
- Returns
- $this The operation object, allowing multiple additions to be chained
Definition at line 17 of file Addition.php.
References Matrix\Operators\Addition\addMatrix(), and Matrix\Operators\Addition\addScalar().
19 if (is_array($value)) {
20 $value =
new Matrix($value);
23 if (is_object($value) && ($value instanceof
Matrix)) {
25 } elseif (is_numeric($value)) {
29 throw new Exception(
'Invalid argument for addition');
addScalar($value)
Execute the addition for a scalar.
addMatrix(Matrix $value)
Execute the addition for a matrix.
Class for the creating "special" Matrices.
The documentation for this class was generated from the following file:
- libs/composer/vendor/markbaker/matrix/classes/src/Operators/Addition.php