CxLU

Advanced Analysis Library Only

AnalysisLibErrType CxLU (void *matrix, int matrixSize, int permutationVector[], int *sign);

Purpose

Performs an LU decomposition on the complex, square matrix A:

PA = LU

where L is a matrixSize-by-matrixSize lower triangular matrix with all diagonal elements equal to one
U is an upper triangular matrix
P is an identity matrix with some rows exchanged based on the information in the permutation vector

On output, the U matrix occupies the upper triangular part of the input matrix, including the diagonal elements, and the L matrix occupies the lower part.

Parameters

Input
Name Type Description
matrixSize integer The number of rows and columns in the square input matrix and the number of elements in the permutation vector.
Output
Name Type Description
matrix numeric array On input, the square matrix to factorize.

On output, the LU factorized matrix.

matrix must be an array of ComplexNum.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

permutationVector integer array Permutation vector.
sign integer Row exchange indicator.

sign = 0 indicates that there is no such exchange or that there is an even number of such exchanges. sign = 1 indicates that there is an odd number of such exchanges.

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.