Stan Math Library
4.9.0
Automatic Differentiation
|
void stan::math::check_cov_matrix | ( | const char * | function, |
const char * | name, | ||
const StdVec & | y | ||
) |
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.
StdVec | A standard vector with inner type either 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 |
function | Function name (for error messages) |
name | Variable name (for error messages) |
y | standard vector of matrices to test. |
`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 52 of file check_cov_matrix.hpp.