1#ifndef STAN_MATH_PRIM_ERR_VALIDATE_UNIT_VECTOR_INDEX_HPP
2#define STAN_MATH_PRIM_ERR_VALIDATE_UNIT_VECTOR_INDEX_HPP
24 std::stringstream msg;
26 msg <<
"Found dimension size one in unit vector declaration."
27 <<
" One-dimensional unit vector is discrete"
28 <<
" but the target distribution must be continuous."
29 <<
" variable=" << var_name
30 <<
"; dimension size expression=" << expr;
32 msg <<
"Found dimension size less than one in unit vector declaration"
33 <<
"; variable=" << var_name
34 <<
"; dimension size expression=" << expr
35 <<
"; expression value=" << val;
37 std::string msg_str(msg.str());
38 throw std::invalid_argument(msg_str.c_str());
void validate_unit_vector_index(const char *var_name, const char *expr, int val)
Check that unit vector is at least size 2.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...