1 #ifndef __STAN__MATH__ERROR_HANDLING__CHECK_GREATER_OR_EQUAL_HPP__
2 #define __STAN__MATH__ERROR_HANDLING__CHECK_GREATER_OR_EQUAL_HPP__
12 template <
typename T_y,
17 struct greater_or_equal {
18 static bool check(
const char*
function,
25 VectorView<const T_low> low_vec(low);
26 for (
size_t n = 0; n <
length(low); n++) {
27 if (!(y >= low_vec[n]))
29 " is %1%, but must be greater than ",
30 low_vec[n],result,Policy());
36 template <
typename T_y,
40 struct greater_or_equal<T_y, T_low, T_result, Policy, true> {
41 static bool check(
const char*
function,
49 VectorView<const T_low> low_vec(low);
50 for (
size_t n = 0; n <
length(y); n++) {
51 if (!(
get(y,n) >= low_vec[n]))
53 " is %1%, but must be greater than or equal to ",
54 low_vec[n],result,Policy());
60 template <
typename T_y,
typename T_low,
typename T_result,
class Policy>
67 return greater_or_equal<T_y,T_low,T_result,Policy,is_vector_like<T_y>::value>::check(
function,y,low,name,result,Policy());
69 template <
typename T_y,
typename T_low,
typename T_result>
78 template <
typename T_y,
typename T_low>
83 return check_greater_or_equal<T_y,T_low,typename scalar_type<T_y>::type *>