Files
mql5-skills/skills/mql5/references/docs/06-matrix/0494-matrix-openblas-factorizations-factorizationcholeskysyps.md
T
2026-06-23 21:47:51 +08:00

2.6 KiB

FactorizationCholeskySyPS

Computes the Cholesky factorization with complete pivoting of a real symmetric (complex Hermitian) positive semidefinite N-by-N matrix. The form of the factorization is:

PT * A * P = L *  LT in case of lower triangular or symmetric matrix A

or

PT * A * P = UT  * U in case of upper triangular matrix A

where P is a permutation matrix, L is lower triangular, U is upper triangular. LAPACK function PSTRF.

Computing for type matrix

bool  matrix::FactorizationCholeskySyPS(
   double          tol           // tolerance
   matrix&         P,            // permutation matrix P
   matrix&         L             // lower or upper triangular matrix
   );

Computing for type matrix

bool  matrix::FactorizationCholeskySyPS(
   float           tol           // tolerance
   matrixf&        P,            // permutation matrix P
   matrixf&        L             // lower or upper triangular matrix
   );

Computing for type matrix

bool  matrix::FactorizationCholeskySyPS(
   double          tol           // tolerance
   matrixc&        P,            // permutation matrix P
   matrixc&        L             // lower or upper triangular matrix
   );

Computing for type matrix

bool  matrix::FactorizationCholeskySyPS(
   float           tol           // tolerance
   matrixcf&       P,            // permutation matrix P
   matrixcf&       L             // lower or upper triangular matrix
   );

Parameters

tol

[in]  User defined tolerance. If tol < 0, then nεmax(A[k,k]), where ε is the machine precision, will be used. The algorithm terminates at the (k-1)st step, if the pivot <=tol.

P

[out]  Permutation matrix P.

L

[out]  Lower or upper triangular matrix.

Return Value

Return true if successful, otherwise false in case of an error.

Note

The input can be a symmetric (Hermitian), upper triangular or lower triangular matrix. Triangular matrices are assumed to be symmetric (Hermitian conjugated).