Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ check_pos_semidefinite() [1/2]

template<typename EigMat , require_matrix_t< EigMat > * = nullptr>
void stan::math::check_pos_semidefinite ( const char *  function,
const char *  name,
const EigMat &  y 
)
inline

Check if the specified matrix is positive definite.

Template Parameters
EigMatA type derived from EigenBase with dynamic rows and columns
Parameters
functionFunction name (for error messages)
nameVariable name (for error messages)
yMatrix to test
Exceptions
<code>std::invalid_argument</code>if the matrix is not square or if the matrix has 0 size.
<code>std::domain_error</code>if the matrix is not symmetric, or if it is not positive semi-definite, or if any element of the matrix is NaN.

Definition at line 30 of file check_pos_semidefinite.hpp.