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

◆ check_symmetric() [2/2]

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

Check if the specified matrix is symmetric.

The error message is either 0 or 1 indexed, specified by stan::error_index::value.

Template Parameters
EigMatType of matrix
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.
<code>std::domain_error</code>if any element not on the main diagonal is NaN

Definition at line 32 of file check_symmetric.hpp.