Check if the specified square, symmetric matrix is positive definite.
This computes an LDLT decomposition to establish positive definiteness, so it can be expensive. If an LDLT or LLT decomposition is available, that should be tested instead.
- Template Parameters
-
EigMat | A type derived from EigenBase with dynamic rows and columns |
- Parameters
-
function | function name (for error messages) |
name | variable name (for error messages) |
y | matrix to test |
- Exceptions
-
std::invalid_argument | if the matrix is not square or if the matrix has 0 size. |
std::domain_error | if the matrix is not symmetric, if it is not positive definite, or if any element is NaN |
Definition at line 34 of file check_pos_definite.hpp.