1#ifndef STAN_MATH_PRIM_ERR_CHECK_POSITIVE_ORDERED_HPP
2#define STAN_MATH_PRIM_ERR_CHECK_POSITIVE_ORDERED_HPP
29template <
typename Vec, require_vector_t<Vec>* =
nullptr,
30 require_not_std_vector_t<Vec>* =
nullptr>
37 if (y_ref.coeff(0) < 0) {
39 std::ostringstream msg;
40 msg <<
"is not a valid positive_ordered vector."
42 std::string msg_str(msg.str());
44 msg_str.c_str(),
", but should be postive.");
62template <
typename StdVec, require_std_vector_t<StdVec>* =
nullptr>
65 for (
size_t i = 0; i < y.size(); ++i) {
auto make_iter_name(const char *name)
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
void check_positive_ordered(const char *function, const char *name, const Vec &y)
Throw an exception if the specified the vector contains negative values or is not sorted into strictl...
void throw_domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
void check_ordered(const char *function, const char *name, const T_y &y)
Throw an exception if the specified vector is not sorted into strictly increasing order.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...