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

◆ check_positive_ordered() [1/2]

template<typename Vec , require_vector_t< Vec > * = nullptr, require_not_std_vector_t< Vec > * = nullptr>
void stan::math::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 strictly increasing order.

Template Parameters
VecA type derived 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 31 of file check_positive_ordered.hpp.