Throw an exception if the specified matrix is not a valid covariance matrix.
A valid covariance matrix is a square, symmetric matrix that is positive definite.
- Template Parameters
-
Mat | Type inheriting from MatrixBase with neither rows or columns defined at compile time to be equal to 1 or a var_value with the var's inner type inheriting from Eigen::MatrixBase with neither rows or columns defined at compile time to be equal to 1 |
- 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 is 0x0 |
`std::domain_error` | if the matrix is not symmetric, if the matrix is not positive definite, or if any element of the matrix is NaN |
Definition at line 29 of file check_cov_matrix.hpp.