CheckPosDef

Advanced Analysis Library Only

AnalysisLibErrType CheckPosDef (void *inputMatrix, int matrixSize, int *positiveDefinite);

Purpose

Checks the positive definiteness of the real square input matrix. A real, square matrix is positive definite if and only if it is symmetric and the quadratic form

xTAx > 0

is true for all nonzero vectors x. For more information about positive definite matrices, refer to Matrix Computations by G.H. Golub and C.F. VanLoan, cited in the Bibliography.

Parameters

Input
Name Type Description
inputMatrix numeric array The input matrix to test for positive definiteness. This matrix must be an array of doubles.
matrixSize integer Number of elements in one dimension of the matrix.
Output
Name Type Description
positiveDefinite integer 1 if the input matrix is positive definite; 0 otherwise.

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.