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

◆ check_sorted() [2/2]

template<typename T_y >
void stan::math::check_sorted ( const char *  function,
const char *  name,
const std::vector< T_y > &  y 
)

Check if the specified vector is sorted into increasing order (repeated values are okay).

Template Parameters
T_yType of scalar
Parameters
functionFunction name (for error messages)
nameVariable name (for error messages)
ystd::vector to test
Exceptions
<code>std::domain_error</code>if the vector elements are not sorted, or if any element is NaN.

Definition at line 56 of file check_sorted.hpp.