Automatic Differentiation
 
Loading...
Searching...
No Matches
is_corr_matrix.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  stan
 The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation from C or the boost::math::lgamma implementation.
 
namespace  stan::math
 Matrices and templated mathematical functions.
 

Functions

template<typename EigMat , require_eigen_matrix_dynamic_t< EigMat > * = nullptr>
bool stan::math::is_corr_matrix (const EigMat &y)
 Return true if the matrix is square and not 0x0, if the matrix is symmetric, diagonals are near 1, positive definite, and no elements are NaN A valid correlation matrix is symmetric, has a unit diagonal (all 1 values), and has all values between -1 and 1 (inclusive).