1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_COLUMN_INDEX_HPP
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_COLUMN_INDEX_HPP
36 template <
typename T_y,
int R,
int C>
39 const Eigen::Matrix<T_y, R, C>& y,
45 std::stringstream msg;
46 msg <<
" for columns of " << name;
47 std::string msg_str(msg.str());
void out_of_range(const char *function, const int max, const int index, const char *msg1="", const char *msg2="")
Throw an out_of_range exception with a consistently formatted message.
bool check_column_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, const size_t i)
Return true if the specified index is a valid column of the matrix.