59                for ($sum = $this->
L[
$i][$j], $k = 
$i - 1; $k >= 0; --$k) {
 
   60                    $sum -= $this->
L[
$i][$k] * $this->
L[$j][$k];
 
   64                        $this->
L[
$i][
$i] = sqrt($sum);
 
   69                    if ($this->
L[
$i][
$i] != 0) {
 
   70                        $this->
L[$j][
$i] = $sum / $this->
L[
$i][
$i];
 
   76                $this->
L[
$i][$k] = 0.0;
 
  119                        for ($j = 0; $j < $nx; ++$j) {
 
  120                            $X[
$i][$j] -= 
$X[$k][$j] * $this->
L[
$i][$k];
 
  123                    for ($j = 0; $j < $nx; ++$j) {
 
  124                        $X[$k][$j] /= $this->
L[$k][$k];
 
  128                for ($k = $this->m - 1; $k >= 0; --$k) {
 
  129                    for ($j = 0; $j < $nx; ++$j) {
 
  130                        $X[$k][$j] /= $this->
L[$k][$k];
 
  132                    for (
$i = 0; 
$i < $k; ++
$i) {
 
  133                        for ($j = 0; $j < $nx; ++$j) {
 
  134                            $X[
$i][$j] -= 
$X[$k][$j] * $this->
L[$k][
$i];
 
  139                return new Matrix(
$X, $this->m, $nx);
 
An exception for terminatinating execution or to throw for unit testing.
Cholesky decomposition class.
solve(Matrix $B)
Solve A*X = B.
__construct(Matrix $A)
CholeskyDecomposition.
isSPD()
Is the matrix symmetric and positive definite?
const MATRIX_DIMENSION_EXCEPTION
getRowDimension()
getRowDimension.
const MATRIX_SPD_EXCEPTION
getColumnDimension()
getColumnDimension.
Class for the creating "special" Matrices.