CxCholesky

Advanced Analysis Library Only

AnalysisLibErrType CxCholesky (void *inputMatrix, int matrixSize, void *matrixR);

Purpose

Calculates the Cholesky factorization of a complex, symmetric positive definite input matrix. If the input matrix is not positive definite, CxCholesky returns an error.

The following formula defines the Cholesky factorization of a matrixSize-by-matrixSize symmetric positive definite matrix A:

A = RHR

where R is an upper triangular matrix of dimensions matrixSize-by-matrixSize
RH is the complex conjugate transpose of R

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:

Parameters

Input
Name Type Description
inputMatrix numeric array Input complex, square matrix. This matrix must be an array of ComplexNum.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

matrixSize integer Number of elements in one dimension of the matrix.
Output
Name Type Description
matrixR mumeric array Result matrix of the Cholesky decomposition, as an array of ComplexNum.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

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.