LabWindows/CVI

Table of Contents

CxCholesky

Advanced Analysis Library Only

AnalysisLibErrType CxCholesky (void *inputMatrix, ssize_t 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 matrixR is an upper triangular matrix of dimensions matrixSize-by-matrixSize
RH is the complex conjugate 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 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 ssize_t Number of elements in one dimension of the matrix.
Output
Name Type Description
matrixR void * 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.

Additional Information

Library: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 5.0 and later

Log in to get a better experience