MF_CholeskyLdecompose
| MD_CholeskyLdecompose |
ME_CholeskyLdecompose |
MF_CholeskyRdecompose |
MD_CholeskyRdecompose |
ME_CholeskyRdecompose |
|
Function | Cholesky 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/Delphi | uses MFstd;
function MF_CholeskyLdecompose( ML:fMatrix; MA:fMatrix; len:UIntSize ):Integer;
function MF_CholeskyRdecompose( MR:fMatrix; MA:fMatrix; len:UIntSize ):Integer;
|
|
Description | MA 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 handling | In the case of a non-positive-definite matrix, ML or MR will remain undefined, and failure is indicated in the return value 1. |
|
Return value | 0, if successful, or 1 in case of a non-positive-definite input matrix |
|
|