2.1.24.8.21 ocmath_is_matrix_positive_definite
Contents
Description
Return whether matrix is positive definite
Syntax
BOOL ocmath_is_matrix_positive_definite( _margOCtoVC * pmat )
Parameters
- pmat
- [input] Pointer to a matrix
Return
TRUE if the matrix is positive definite, FALSE if not
Examples
EX
void test_ocmath_is_matrix_positive_definite() { bool bRet; matrix mp = {{12, 3, 2, 1, 1},{3, 11, 1, 2, 0}, {2, 1, 10, 1, 2},{1, 2, 1, 11, 3}, {1, 0, 2, 3, 12}}; bRet = ocmath_is_matrix_positive_definite(&mp); matrix mNonP = {{1, 0, 0}, {0, -2, 0}, {0, 0, 3}}; bRet = ocmath_is_matrix_positive_definite(&mNonP); return; }
Remark
See Also
Header to Include
origin.h