1#ifndef STAN_MATH_PRIM_ERR_IS_SYMMETRIC_HPP
2#define STAN_MATH_PRIM_ERR_IS_SYMMETRIC_HPP
23template <
typename EigMat, require_eigen_matrix_dynamic_t<EigMat>* =
nullptr>
25 const auto& y_ref =
to_ref(y);
29 Eigen::Index k = y_ref.rows();
33 for (Eigen::Index m = 0; m < k; ++m) {
34 for (Eigen::Index n = m + 1; n < k; ++n) {
T value_of(const fvar< T > &v)
Return the value of the specified variable.
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
bool is_square(const EigMat &y)
Return true if the matrix is square.
bool is_symmetric(const EigMat &y)
Return true if the matrix is square, and no element not on the main diagonal is NaN.
const double CONSTRAINT_TOLERANCE
The tolerance for checking arithmetic bounds in rank and in simplexes.
fvar< T > fabs(const fvar< T > &x)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...