Cholesky
Advanced Analysis Library Only
AnalysisLibErrType Cholesky (void *inputMatrix, ssize_t matrixSize, void *matrixR);
Purpose
Calculates the Cholesky factorization of a real, symmetric positive definite input matrix. If the input matrix is not positive definite, Cholesky returns an error.
The following formula defines the Cholesky factorization of an n-by-n symmetric positive definite matrix A:
A = RTR
where | matrixR is an upper triangular matrix of dimensions n-by-n |
RT is the transpose of matrixR |
Cholesky factorization is similar to LU factorization for symmetric positive definite matrices. If the matrix in your application is positive definite, use Cholesky factorization rather than LU factorization for the following reasons:
- The algorithm is well defined.
- Numerical stability does not require pivoting.
- Cholesky factorization requires about half the programming time and less memory than LU factorization.
Parameters
Input | ||
Name | Type | Description |
inputMatrix | void * | Input square, positive definite matrix. |
matrixSize | ssize_t | Number of elements in one dimension of the matrix. |
Output | ||
Name | Type | Description |
matrixR | void * | The factored upper triangular matrix. You can pass inputMatrix to matrixR or NULL to matrixR to perform in place operation. |
Return Value
Name | Type | Description |
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |
Additional Information
Library: Advanced Analysis Library
Include file: analysis.h
LabWindows/CVI compatibility: LabWindows/CVI 5.0 and later