1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_RANGE_HPP 2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_RANGE_HPP 25 int index,
int nested_level,
const char* error_msg) {
30 std::stringstream msg;
31 msg <<
"; index position = " << nested_level;
32 std::string msg_str(msg.str());
34 out_of_range(
function, max, index, msg_str.c_str(), error_msg);
49 int index,
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.