Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ check_positive_ordered() [2/2]

template<typename StdVec , require_std_vector_t< StdVec > * = nullptr>
void stan::math::check_positive_ordered ( const char *  function,
const char *  name,
const StdVec &  y 
)

Throw an exception if any of the vectors in a standard vector contains negative values or is not sorted into strictly increasing order.

Template Parameters
StdVecA standard vector type with an value_type inheriting from Eigen::EigenBase with 1 compile time row or column
Parameters
functionFunction name (for error messages)
nameVariable name (for error messages)
yVector to test
Exceptions
`std::domain_error`if the vector contains non-positive values, if the values are not ordered, if there are duplicated values, or if any element is NaN

Definition at line 63 of file check_positive_ordered.hpp.