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

◆ check_ordered() [1/2]

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

Throw an exception if each vector in a standard vector is not sorted into strictly increasing order.

Template Parameters
T_yA type inheriting from EigenBase with either 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 elements are not ordered, if there are duplicated values, or if any element is NaN
Template Parameters
T_yA standard vector with an inner vector type
Parameters
functionFunction name (for error messages)
nameVariable name (for error messages)
ystd::vector to test
Exceptions
`std::domain_error`if the vector elements are not ordered, if there are duplicated values, or if any element is NaN

Definition at line 30 of file check_ordered.hpp.