ILIAS
eassessment Revision 61809
|
PHPExcel root directory. More...
Public Member Functions | |
__construct () | |
Polymorphic constructor. | |
getArray () | |
getArray | |
getRowDimension () | |
getRowDimension | |
getColumnDimension () | |
getColumnDimension | |
get ($i=null, $j=null) | |
get | |
getMatrix () | |
getMatrix | |
checkMatrixDimensions ($B=null) | |
checkMatrixDimensions | |
set ($i=null, $j=null, $c=null) | |
set | |
identity ($m=null, $n=null) | |
identity | |
diagonal ($m=null, $n=null, $c=1) | |
diagonal | |
getMatrixByRow ($i0=null, $iF=null) | |
getMatrixByRow | |
getMatrixByCol ($j0=null, $jF=null) | |
getMatrixByCol | |
transpose () | |
transpose | |
trace () | |
trace | |
uminus () | |
uminus | |
plus () | |
plus | |
plusEquals () | |
plusEquals | |
minus () | |
minus | |
minusEquals () | |
minusEquals | |
arrayTimes () | |
arrayTimes | |
arrayTimesEquals () | |
arrayTimesEquals | |
arrayRightDivide () | |
arrayRightDivide | |
arrayRightDivideEquals () | |
arrayRightDivideEquals | |
arrayLeftDivide () | |
arrayLeftDivide | |
arrayLeftDivideEquals () | |
arrayLeftDivideEquals | |
times () | |
times | |
power () | |
power | |
concat () | |
concat | |
solve ($B) | |
Solve A*X = B. | |
inverse () | |
Matrix inverse or pseudoinverse. | |
det () | |
det |
Data Fields | |
const | PolymorphicArgumentException = "Invalid argument pattern for polymorphic function." |
const | ArgumentTypeException = "Invalid argument type." |
const | ArgumentBoundsException = "Invalid argument range." |
const | MatrixDimensionException = "Matrix dimensions are not equal." |
const | ArrayLengthException = "Array length must be a multiple of m." |
$A = array() |
Private Attributes | |
$m | |
$n |
PHPExcel root directory.
Definition at line 27 of file Matrix.php.
PHPExcel_Shared_JAMA_Matrix::__construct | ( | ) |
Polymorphic constructor.
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.
Definition at line 66 of file Matrix.php.
References $m, $n, ArrayLengthException, n, and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::arrayLeftDivide | ( | ) |
arrayLeftDivide
Element-by-element Left division A / B
Matrix | $B | Matrix B |
Definition at line 778 of file Matrix.php.
References $m, $n, ArgumentTypeException, checkMatrixDimensions(), and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::arrayLeftDivideEquals | ( | ) |
arrayLeftDivideEquals
Element-by-element Left division Aij = Aij / Bij
mixed | $B | Matrix/Array |
Definition at line 815 of file Matrix.php.
References $m, $n, ArgumentTypeException, checkMatrixDimensions(), and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::arrayRightDivide | ( | ) |
arrayRightDivide
Element-by-element right division A / B
Matrix | $B | Matrix B |
Definition at line 685 of file Matrix.php.
References $m, $n, ArgumentTypeException, checkMatrixDimensions(), PHPExcel_Shared_String\convertToNumberIfFraction(), PHPExcel_Calculation_Functions\NaN(), and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::arrayRightDivideEquals | ( | ) |
arrayRightDivideEquals
Element-by-element right division Aij = Aij / Bij
mixed | $B | Matrix/Array |
Definition at line 741 of file Matrix.php.
References $m, $n, ArgumentTypeException, checkMatrixDimensions(), and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::arrayTimes | ( | ) |
arrayTimes
Element-by-element multiplication Cij = Aij * Bij
mixed | $B | Matrix/Array |
Definition at line 597 of file Matrix.php.
References $m, $n, ArgumentTypeException, checkMatrixDimensions(), and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::arrayTimesEquals | ( | ) |
arrayTimesEquals
Element-by-element multiplication Aij = Aij * Bij
mixed | $B | Matrix/Array |
Definition at line 634 of file Matrix.php.
References $m, $n, ArgumentTypeException, checkMatrixDimensions(), PHPExcel_Shared_String\convertToNumberIfFraction(), PHPExcel_Calculation_Functions\NaN(), and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::checkMatrixDimensions | ( | $B = null | ) |
checkMatrixDimensions
Is matrix B the same size?
Matrix | $B | Matrix B |
Definition at line 272 of file Matrix.php.
References ArgumentTypeException, MatrixDimensionException, and n.
Referenced by arrayLeftDivide(), arrayLeftDivideEquals(), arrayRightDivide(), arrayRightDivideEquals(), arrayTimes(), arrayTimesEquals(), concat(), minus(), minusEquals(), plus(), plusEquals(), and power().
PHPExcel_Shared_JAMA_Matrix::concat | ( | ) |
concat
A = A & B
mixed | $B | Matrix/Array |
Definition at line 992 of file Matrix.php.
References $m, $n, ArgumentTypeException, checkMatrixDimensions(), and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::det | ( | ) |
PHPExcel_Shared_JAMA_Matrix::diagonal | ( | $m = null , |
|
$n = null , |
|||
$c = 1 |
|||
) |
diagonal
Generate a diagonal matrix
int | $m | Row dimension |
int | $n | Column dimension |
mixed | $c | Diagonal value |
Definition at line 323 of file Matrix.php.
Referenced by identity().
PHPExcel_Shared_JAMA_Matrix::get | ( | $i = null , |
|
$j = null |
|||
) |
get
Get the i,j-th element of the matrix.
int | $i | Row position |
int | $j | Column position |
Definition at line 156 of file Matrix.php.
PHPExcel_Shared_JAMA_Matrix::getArray | ( | ) |
PHPExcel_Shared_JAMA_Matrix::getColumnDimension | ( | ) |
getColumnDimension
Definition at line 143 of file Matrix.php.
References $n.
PHPExcel_Shared_JAMA_Matrix::getMatrix | ( | ) |
getMatrix
Get a submatrix
int | $i0 | Initial row index |
int | $iF | Final row index |
int | $j0 | Initial column index |
int | $jF | Final column index |
Definition at line 171 of file Matrix.php.
References $m, $n, ArgumentBoundsException, n, and PolymorphicArgumentException.
Referenced by getMatrixByCol(), and getMatrixByRow().
PHPExcel_Shared_JAMA_Matrix::getMatrixByCol | ( | $j0 = null , |
|
$jF = null |
|||
) |
getMatrixByCol
Get a submatrix by column index/range
int | $i0 | Initial column index |
int | $iF | Final column index |
Definition at line 361 of file Matrix.php.
References ArgumentTypeException, and getMatrix().
PHPExcel_Shared_JAMA_Matrix::getMatrixByRow | ( | $i0 = null , |
|
$iF = null |
|||
) |
getMatrixByRow
Get a submatrix by row index/range
int | $i0 | Initial row index |
int | $iF | Final row index |
Definition at line 340 of file Matrix.php.
References ArgumentTypeException, getMatrix(), and n.
PHPExcel_Shared_JAMA_Matrix::getRowDimension | ( | ) |
PHPExcel_Shared_JAMA_Matrix::identity | ( | $m = null , |
|
$n = null |
|||
) |
identity
Generate an identity matrix.
int | $m | Row dimension |
int | $n | Column dimension |
Definition at line 309 of file Matrix.php.
References $m, $n, and diagonal().
Referenced by inverse().
PHPExcel_Shared_JAMA_Matrix::inverse | ( | ) |
Matrix inverse or pseudoinverse.
Definition at line 1042 of file Matrix.php.
References identity(), and solve().
PHPExcel_Shared_JAMA_Matrix::minus | ( | ) |
minus
A - B
mixed | $B | Matrix/Array |
Definition at line 510 of file Matrix.php.
References $m, $n, ArgumentTypeException, checkMatrixDimensions(), and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::minusEquals | ( | ) |
minusEquals
A = A - B
mixed | $B | Matrix/Array |
Definition at line 546 of file Matrix.php.
References $m, $n, ArgumentTypeException, checkMatrixDimensions(), PHPExcel_Shared_String\convertToNumberIfFraction(), PHPExcel_Calculation_Functions\NaN(), and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::plus | ( | ) |
plus
A + B
mixed | $B | Matrix/Array |
Definition at line 424 of file Matrix.php.
References $m, $n, ArgumentTypeException, checkMatrixDimensions(), and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::plusEquals | ( | ) |
plusEquals
A = A + B
mixed | $B | Matrix/Array |
Definition at line 460 of file Matrix.php.
References $m, $n, ArgumentTypeException, checkMatrixDimensions(), PHPExcel_Shared_String\convertToNumberIfFraction(), PHPExcel_Calculation_Functions\NaN(), and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::power | ( | ) |
power
A = A ^ B
mixed | $B | Matrix/Array |
Definition at line 942 of file Matrix.php.
References $m, $n, ArgumentTypeException, checkMatrixDimensions(), PHPExcel_Shared_String\convertToNumberIfFraction(), PHPExcel_Calculation_Functions\NaN(), and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::set | ( | $i = null , |
|
$j = null , |
|||
$c = null |
|||
) |
set
Set the i,j-th element of the matrix.
int | $i | Row position |
int | $j | Column position |
mixed | $c | Int/float/double value |
Definition at line 295 of file Matrix.php.
PHPExcel_Shared_JAMA_Matrix::solve | ( | $B | ) |
Solve A*X = B.
Matrix | $B | Right hand side |
Definition at line 1026 of file Matrix.php.
References n.
Referenced by inverse().
PHPExcel_Shared_JAMA_Matrix::times | ( | ) |
times
Matrix multiplication
mixed | $n | Matrix/Array/Scalar |
Definition at line 851 of file Matrix.php.
References $m, $n, ArgumentTypeException, JAMAError(), n, and PolymorphicArgumentException.
PHPExcel_Shared_JAMA_Matrix::trace | ( | ) |
PHPExcel_Shared_JAMA_Matrix::transpose | ( | ) |
transpose
Tranpose matrix
Definition at line 380 of file Matrix.php.
PHPExcel_Shared_JAMA_Matrix::uminus | ( | ) |
uminus
Unary minus matrix -A
Definition at line 413 of file Matrix.php.
PHPExcel_Shared_JAMA_Matrix::$A = array() |
Definition at line 42 of file Matrix.php.
Referenced by getArray().
|
private |
Definition at line 50 of file Matrix.php.
Referenced by __construct(), arrayLeftDivide(), arrayLeftDivideEquals(), arrayRightDivide(), arrayRightDivideEquals(), arrayTimes(), arrayTimesEquals(), concat(), diagonal(), getMatrix(), getRowDimension(), identity(), minus(), minusEquals(), plus(), plusEquals(), power(), times(), and transpose().
|
private |
Definition at line 58 of file Matrix.php.
Referenced by __construct(), arrayLeftDivide(), arrayLeftDivideEquals(), arrayRightDivide(), arrayRightDivideEquals(), arrayTimes(), arrayTimesEquals(), concat(), diagonal(), getColumnDimension(), getMatrix(), identity(), minus(), minusEquals(), plus(), plusEquals(), power(), times(), trace(), and transpose().
const PHPExcel_Shared_JAMA_Matrix::ArgumentBoundsException = "Invalid argument range." |
Definition at line 32 of file Matrix.php.
const PHPExcel_Shared_JAMA_Matrix::ArgumentTypeException = "Invalid argument type." |
Definition at line 31 of file Matrix.php.
Referenced by PHPExcel_Shared_JAMA_QRDecomposition\__construct(), and PHPExcel_Shared_JAMA_LUDecomposition\__construct().
const PHPExcel_Shared_JAMA_Matrix::ArrayLengthException = "Array length must be a multiple of m." |
Definition at line 34 of file Matrix.php.
const PHPExcel_Shared_JAMA_Matrix::MatrixDimensionException = "Matrix dimensions are not equal." |
Definition at line 33 of file Matrix.php.
Referenced by PHPExcel_Shared_JAMA_LUDecomposition\det(), and PHPExcel_Shared_JAMA_QRDecomposition\solve().
const PHPExcel_Shared_JAMA_Matrix::PolymorphicArgumentException = "Invalid argument pattern for polymorphic function." |
Definition at line 30 of file Matrix.php.