1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_LESS_OR_EQUAL_HPP 2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_LESS_OR_EQUAL_HPP 13 template <
typename T_y,
typename T_high,
bool is_vec>
15 static void check(
const char*
function,
const char* name,
const T_y& y,
19 if (!(y <= high_vec[n])) {
20 std::stringstream msg;
21 msg <<
", but must be less than or equal to ";
23 std::string msg_str(msg.str());
30 template <
typename T_y,
typename T_high>
32 static void check(
const char*
function,
const char* name,
const T_y& y,
37 std::stringstream msg;
38 msg <<
", but must be less than or equal to ";
40 std::string msg_str(msg.str());
61 template <
typename T_y,
typename T_high>
63 const T_y& y,
const T_high& high) {
65 function, name, y, high);
void check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Check if y is less or equal to high.
scalar_seq_view provides a uniform sequence-like wrapper around either a scalar or a sequence of scal...
size_t length(const std::vector< T > &x)
Returns the length of the provided std::vector.
void domain_error_vec(const char *function, const char *name, const T &y, size_t i, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
T get(const std::vector< T > &x, size_t n)
Returns the n-th element of the provided std::vector.
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.
static void check(const char *function, const char *name, const T_y &y, const T_high &high)
static void check(const char *function, const char *name, const T_y &y, const T_high &high)