Throw an exception if the specified matrix is not a valid correlation matrix.
A valid correlation matrix is symmetric positive definite, has a unit diagonal (all 1 values), and has all values between -1 and 1 (inclusive).
- 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 | Name of the function this was called from |
| name | Name of the variable |
| y | Matrix to test |
- Exceptions
-
| `std::invalid_argument` | if the matrix is not square |
| `std::domain_error` | if the matrix is non-symmetric, diagonals not near 1, not positive definite, or any of the elements are NaN |
Definition at line 34 of file check_corr_matrix.hpp.