MF_CholeskyLdecompose MD_CholeskyLdecompose ME_CholeskyLdecompose
MF_CholeskyRdecompose MD_CholeskyRdecompose ME_CholeskyRdecompose
FunctionCholesky decomposition of a symmetric, positive-definite matrix
Syntax C/C++#include <MFstd.h>
int MF_CholeskyLdecompose( fMatrix ML, fMatrix MA, ui len );
int MF_CholeskyRdecompose( fMatrix MR, fMatrix MA, ui len );
C++ MatObj#include <OptiVec.h>
void matrix<T>::CholeskyLdecompose( const matrix<T>& MA );
void matrix<T>::CholeskyRdecompose( const matrix<T>& MA );
Pascal/Delphiuses MFstd;
function MF_CholeskyLdecompose( ML:fMatrix; MA:fMatrix; len:UIntSize ):Integer;
function MF_CholeskyRdecompose( MR:fMatrix; MA:fMatrix; len:UIntSize ):Integer;
DescriptionMA is decomposed into a product MA = ML * MR, where L is left (lower) triangular with the diagonal elements equal to 1, and MR is right (upper) triangular. Additionally, MR is the transposed of ML, MR = MLT. Consequently, one needs only either ML or MR for the complete information, and one can choose either to get ML from MF_CholeskyLdecompose, or to get MR from MF_CholeskyLdecompose

MA may or may not be overwritten by ML or MR.

The return value indicates if the factorization was successful (return value 0), or if the input matrix turned out to be non-positive-definite (return value 1).

Error handlingIn the case of a non-positive-definite matrix, ML or MR will remain undefined, and failure is indicated in the return value 1.
Return value0, if successful, or 1 in case of a non-positive-definite input matrix
See alsochapter 10

MatrixLib Table of Contents  OptiVec home