Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 400] [Versions 311 and 401]

(no description)

File Size: 147 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

CholeskyDecomposition:: (4 methods):
  __construct()
  isSPD()
  getL()
  solve()


Class: CholeskyDecomposition  - X-Ref

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.

__construct(Matrix $A)   X-Ref
CholeskyDecomposition.

Class constructor - decomposes symmetric positive definite matrix

param: Matrix $A Matrix square symmetric positive definite matrix

isSPD()   X-Ref
Is the matrix symmetric and positive definite?

return: bool

getL()   X-Ref
getL.

Return triangular factor.

return: Matrix Lower triangular matrix

solve(Matrix $B)   X-Ref
Solve A*X = B.

param: $B Row-equal matrix
return: Matrix L * L' * X = B