__construct()
As PHP has no support for polymorphic constructors, we hack 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.
arrayLeftDivide() : \Matrix
Element-by-element Left division A / B
\Matrix
Division resultarrayLeftDivideEquals() : \Matrix
Element-by-element Left division Aij = Aij / Bij
\Matrix
Matrix AijarrayRightDivide() : \Matrix
Element-by-element right division A / B
\Matrix
Division resultarrayRightDivideEquals() : \Matrix
Element-by-element right division Aij = Aij / Bij
\Matrix
Matrix AijarrayTimes() : \Matrix
Element-by-element multiplication Cij = Aij * Bij
\Matrix
Matrix CijarrayTimesEquals() : \Matrix
Element-by-element multiplication Aij = Aij * Bij
\Matrix
Matrix AijcheckMatrixDimensions(\Matrix $B) : boolean
Is matrix B the same size?
\Matrix
Matrix B
boolean
concat() : \Matrix
A = A & B
\Matrix
Sumdet() : float
Calculate determinant
float
Determinantdiagonal(int $m, int $n, mixed $c) : \Matrix
Generate a diagonal matrix
int
Row dimension
int
Column dimension
mixed
Diagonal value
\Matrix
Diagonal matrixget(int $i, int $j) : mixed
Get the i,j-th element of the matrix.
int
Row position
int
Column position
mixed
Element (int/float/double)getArray() : array
array
Matrix arraygetColumnDimension() : int
int
Column dimensiongetMatrix() : \Matrix
Get a submatrix
\Matrix
SubmatrixgetMatrixByCol($j0, $jF) : \Matrix
Get a submatrix by column index/range
\Matrix
SubmatrixgetMatrixByRow(int $i0, int $iF) : \Matrix
Get a submatrix by row index/range
int
Initial row index
int
Final row index
\Matrix
SubmatrixgetRowDimension() : int
int
Row dimensionidentity(int $m, int $n) : \Matrix
Generate an identity matrix.
int
Row dimension
int
Column dimension
\Matrix
Identity matrixinverse() : \Matrix
\Matrix
... Inverse(A) if A is square, pseudoinverse otherwise.minus() : \Matrix
A - B
\Matrix
SumminusEquals() : \Matrix
A = A - B
\Matrix
Sumplus() : \Matrix
A + B
\Matrix
SumplusEquals() : \Matrix
A = A + B
\Matrix
Sumpower() : \Matrix
A = A ^ B
\Matrix
Sumset(int $i, int $j, mixed $c) : mixed
Set the i,j-th element of the matrix.
int
Row position
int
Column position
mixed
Int/float/double value
mixed
Element (int/float/double)solve(\Matrix $B) : \Matrix
\Matrix
Right hand side
\Matrix
... Solution if A is square, least squares solution otherwisetimes() : \Matrix
Matrix multiplication
\Matrix
Producttrace() : float
Sum of diagonal elements
float
Sum of diagonal elementstranspose() : \Matrix
Tranpose matrix
\Matrix
Transposed matrixuminus() : \Matrix
Unary minus matrix -A
\Matrix
Unary minus matrix$A : array
access | public |
---|
$m : int
access | private |
---|
$n : int
access | private |
---|
ArgumentBoundsException
ArgumentTypeException
ArrayLengthException
MatrixDimensionException
PolymorphicArgumentException