1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_SYMMETRIC_HPP 2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_SYMMETRIC_HPP 33 template <
typename T_y>
37 const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y) {
47 size_type k = y.rows();
50 for (size_type m = 0; m < k; ++m) {
51 for (size_type n = m + 1; n < k; ++n) {
54 std::ostringstream msg1;
55 msg1 <<
"is not symmetric. " 58 std::string msg1_str(msg1.str());
59 std::ostringstream msg2;
64 std::string msg2_str(msg2.str());
66 msg1_str.c_str(), msg2_str.c_str());
fvar< T > fabs(const fvar< T > &x)
T value_of(const fvar< T > &v)
Return the value of the specified variable.
const double CONSTRAINT_TOLERANCE
The tolerance for checking arithmetic bounds In rank and in simplexes.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
Type for sizes and indexes in an Eigen matrix with double e.
Primary template class for the metaprogram to compute the index type of a container.
void check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Check if the specified matrix is symmetric.
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
void check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Check if the specified matrix is square.