1 #ifndef __STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_ORDERED_HPP__
2 #define __STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_ORDERED_HPP__
26 template <
typename T_y,
typename T_result,
class Policy>
28 const Eigen::Matrix<T_y,Eigen::Dynamic,1>& y,
37 for (
size_t n = 1; n < y.size(); n++) {
38 if (!(y[n] > y[n-1])) {
39 std::ostringstream stream;
40 stream << name <<
" is not a valid ordered vector."
41 <<
" The element at " << n
42 <<
" is %1%, but should be greater than the previous element, "
44 T_result tmp = raise_domain_error<T_result,T_y>(
function,
55 template <
typename T_y,
typename T_result>
57 const Eigen::Matrix<T_y,Eigen::Dynamic,1>& y,
64 const Eigen::Matrix<T,Eigen::Dynamic,1>& y,