POLYMORPHIC_ARGUMENT_EXCEPTION
POLYMORPHIC_ARGUMENT_EXCEPTION = 'Invalid argument pattern for polymorphic function.'
Matrix class.
__construct( $args)
Polymorphic constructor.
As PHP has no support for polymorphic constructors, we use tricks to make our own sort of polymorphism using func_num_args, func_get_arg, and gettype. In essence, we're just implementing a simple RTTI filter and calling the appropriate constructor.
$args |
getMatrix( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
getMatrix.
Get a submatrix
$args |
Submatrix
checkMatrixDimensions(\PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix $B = null) : boolean
checkMatrixDimensions.
Is matrix B the same size?
\PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix | $B | Matrix B |
identity(integer $m = null, integer $n = null) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
identity.
Generate an identity matrix.
integer | $m | Row dimension |
integer | $n | Column dimension |
Identity matrix
diagonal(integer $m = null, integer $n = null, mixed $c = 1) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
diagonal.
Generate a diagonal matrix
integer | $m | Row dimension |
integer | $n | Column dimension |
mixed | $c | Diagonal value |
Diagonal matrix
getMatrixByRow(integer $i0 = null, integer $iF = null) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
getMatrixByRow.
Get a submatrix by row index/range
integer | $i0 | Initial row index |
integer | $iF | Final row index |
Submatrix
getMatrixByCol(integer $j0 = null, integer $jF = null) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
getMatrixByCol.
Get a submatrix by column index/range
integer | $j0 | Initial column index |
integer | $jF | Final column index |
Submatrix
transpose() : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
transpose.
Tranpose matrix
Transposed matrix
uminus() : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
uminus.
Unary minus matrix -A
Unary minus matrix
plus( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
plus.
A + B
$args |
Sum
plusEquals( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
plusEquals.
A = A + B
$args |
Sum
minus( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
minus.
A - B
$args |
Sum
minusEquals( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
minusEquals.
A = A - B
$args |
Sum
arrayTimes( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
arrayTimes.
Element-by-element multiplication Cij = Aij * Bij
$args |
Matrix Cij
arrayTimesEquals( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
arrayTimesEquals.
Element-by-element multiplication Aij = Aij * Bij
$args |
Matrix Aij
arrayRightDivide( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
arrayRightDivide.
Element-by-element right division A / B
$args |
Division result
arrayRightDivideEquals( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
arrayRightDivideEquals.
Element-by-element right division Aij = Aij / Bij
$args |
Matrix Aij
arrayLeftDivide( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
arrayLeftDivide.
Element-by-element Left division A / B
$args |
Division result
arrayLeftDivideEquals( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
arrayLeftDivideEquals.
Element-by-element Left division Aij = Aij / Bij
$args |
Matrix Aij
times( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
times.
Matrix multiplication
$args |
Product
power( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
power.
A = A ^ B
$args |
Sum
concat( $args) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
concat.
A = A & B
$args |
Sum
solve(\PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix $B) : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
Solve A*X = B.
\PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix | $B | Right hand side |
... Solution if A is square, least squares solution otherwise
inverse() : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix
Matrix inverse or pseudoinverse.
... Inverse(A) if A is square, pseudoinverse otherwise.