1 #ifndef __STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_POSITIVE_ORDERED_HPP__
2 #define __STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_POSITIVE_ORDERED_HPP__
26 template <
typename T_y,
typename T_result,
class Policy>
28 const Eigen::Matrix<T_y,Eigen::Dynamic,1>& y,
38 std::ostringstream stream;
39 stream << name <<
" is not a valid positive_ordered vector."
40 <<
" The element at 0 is %1%, but should be postive.";
41 T_result tmp = raise_domain_error<T_result,T_y>(
function,
49 for (
size_t n = 1; n < y.size(); n++) {
50 if (!(y[n] > y[n-1])) {
51 std::ostringstream stream;
52 stream << name <<
" is not a valid ordered vector."
53 <<
" The element at " << n
54 <<
" is %1%, but should be greater than the previous element, "
56 T_result tmp = raise_domain_error<T_result,T_y>(
function,
67 template <
typename T_y,
typename T_result>
69 const Eigen::Matrix<T_y,Eigen::Dynamic,1>& y,
76 const Eigen::Matrix<T,Eigen::Dynamic,1>& y,