1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_RANGE_HPP 2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_RANGE_HPP 33 const char* error_msg) {
38 std::stringstream msg;
39 msg <<
"; index position = " << nested_level;
40 std::string msg_str(msg.str());
42 out_of_range(
function, max, index, msg_str.c_str(), error_msg);
63 const char* error_msg) {
void check_range(const char *function, const char *name, int max, int index, int nested_level, const char *error_msg)
Check if specified index is within range.
void out_of_range(const char *function, int max, int index, const char *msg1="", const char *msg2="")
Throw an out_of_range exception with a consistently formatted message.
int max(const std::vector< int > &x)
Returns the maximum coefficient in the specified column vector.