1 #ifndef STAN__MATH__ERROR_HANDLING_CHECK_EQUAL_HPP
2 #define STAN__MATH__ERROR_HANDLING_CHECK_EQUAL_HPP
11 template <
typename T_y,
16 static bool check(
const char*
function,
22 VectorView<const T_eq> eq_vec(eq);
23 for (
size_t n = 0; n <
length(eq); n++) {
24 if (!(y == eq_vec[n]))
26 " is %1%, but must be equal to ",
34 template <
typename T_y,
37 struct equal<T_y, T_eq, T_result, true> {
38 static bool check(
const char*
function,
45 VectorView<const T_eq> eq_vec(eq);
46 for (
size_t n = 0; n <
length(y); n++) {
47 if (!(
get(y,n) == eq_vec[n]))
49 " is %1%, but must be equal to ",
56 template <
typename T_y,
typename T_eq,
typename T_result>
62 return equal<T_y,T_eq,T_result,is_vector_like<T_y>::value>
63 ::check(
function,y,eq,name,result);
bool check_equal(const char *function, const T_y &y, const T_eq &eq, const char *name, T_result *result)
bool dom_err(const char *function, const T &y, const char *name, const char *error_msg, const T_msg error_msg2, T_result *result)
bool dom_err_vec(const size_t i, const char *function, const T &y, const char *name, const char *error_msg, const T_msg error_msg2, T_result *result)
T get(const T &x, size_t n)