1#ifndef STAN_MATH_PRIM_ERR_VALIDATE_POSITIVE_INDEX_HPP
2#define STAN_MATH_PRIM_ERR_VALIDATE_POSITIVE_INDEX_HPP
25 std::stringstream msg;
26 msg <<
"Found dimension size less than one in constrained type "
27 "declaration (simplex, sum_to_zero_vector, etc.)"
28 <<
"; variable=" << var_name <<
"; dimension size expression=" << expr
29 <<
"; expression value=" << val;
30 std::string msg_str(msg.str());
31 throw std::invalid_argument(msg_str.c_str());
void validate_positive_index(const char *var_name, const char *expr, int val)
Check that size is at least 1.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...