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

◆ check_ordered() [2/2]

template<typename T_y , require_std_vector_vt< is_stan_scalar, 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.

Template Parameters
T_yA standard vector with inner scalar 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 61 of file check_ordered.hpp.