class CholeskyDecomposition (View source)

Cholesky decomposition class.

For a symmetric, positive definite matrix A, the Cholesky decomposition is an lower triangular matrix L so that A = L*L'.

If the matrix is not symmetric or positive definite, the constructor returns a partial decomposition and sets an internal flag that may be queried by the isSPD() method.

Methods

__construct(Matrix $A)

CholeskyDecomposition.

bool
isSPD()

Is the matrix symmetric and positive definite?

getL()

getL.

solve(Matrix $B)

Solve A*X = B.

Details

__construct(Matrix $A)

CholeskyDecomposition.

Class constructor - decomposes symmetric positive definite matrix

Parameters

Matrix $A Matrix square symmetric positive definite matrix

bool isSPD()

Is the matrix symmetric and positive definite?

Return Value

bool

Matrix getL()

getL.

Return triangular factor.

Return Value

Matrix Lower triangular matrix

Matrix solve(Matrix $B)

Solve A*X = B.

Parameters

Matrix $B Row-equal matrix

Return Value

Matrix L * L' * X = B