1 #ifndef STAN_MATH_PRIM_SCAL_ERR_CHECK_GREATER_HPP 2 #define STAN_MATH_PRIM_SCAL_ERR_CHECK_GREATER_HPP 14 template <
typename T_y,
typename T_low,
bool is_vec>
16 static void check(
const char*
function,
const char* name,
const T_y& y,
20 if (!(y > low_vec[n])) {
21 std::stringstream msg;
22 msg <<
", but must be greater than ";
24 std::string msg_str(msg.str());
31 template <
typename T_y,
typename T_low>
33 static void check(
const char*
function,
const char* name,
const T_y& y,
38 std::stringstream msg;
39 msg <<
", but must be greater than ";
41 std::string msg_str(msg.str());
62 template <
typename T_y,
typename T_low>
63 inline void check_greater(
const char*
function,
const char* name,
const T_y& y,
66 function, name, y, low);
static void check(const char *function, const char *name, const T_y &y, const T_low &low)
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.
static void check(const char *function, const char *name, const T_y &y, const T_low &low)
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.
void check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Check if y is strictly greater than low.