1 #ifndef STAN__MATH__ERROR_HANDLING_CHECK_GREATER_OR_EQUAL_HPP
2 #define STAN__MATH__ERROR_HANDLING_CHECK_GREATER_OR_EQUAL_HPP
11 template <
typename T_y,
15 struct greater_or_equal {
16 static bool check(
const char*
function,
22 VectorView<const T_low> low_vec(low);
23 for (
size_t n = 0; n <
length(low); n++) {
24 if (!(y >= low_vec[n]))
26 " is %1%, but must be greater than ",
33 template <
typename T_y,
36 struct greater_or_equal<T_y, T_low, T_result, true> {
37 static bool check(
const char*
function,
44 VectorView<const T_low> low_vec(low);
45 for (
size_t n = 0; n <
length(y); n++) {
46 if (!(
get(y,n) >= low_vec[n]))
48 " is %1%, but must be greater than or equal to ",
57 template <
typename T_y,
typename T_low,
typename T_result>
63 return greater_or_equal<T_y,T_low,T_result,is_vector_like<T_y>::value>
64 ::check(
function,y,low,name,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)
bool check_greater_or_equal(const char *function, const T_y &y, const T_low &low, const char *name, T_result *result)