1 #ifndef STAN_MATH_PRIM_MAT_FUN_SEGMENT_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_SEGMENT_HPP
18 Eigen::Matrix<T, Eigen::Dynamic, 1>
19 segment(
const Eigen::Matrix<T, Eigen::Dynamic, 1>& v,
23 static_cast<size_t>(v.rows()));
27 static_cast<size_t>(v.rows()));
29 return v.segment(i-1, n);
34 Eigen::Matrix<T, 1, Eigen::Dynamic>
35 segment(
const Eigen::Matrix<T, 1, Eigen::Dynamic>& v,
39 static_cast<size_t>(v.cols()));
43 static_cast<size_t>(v.cols()));
46 return v.segment(i-1, n);
58 static_cast<size_t>(sv.size()));
61 for (
size_t j = 0; j < n; ++j)
62 s.push_back(sv[i + j - 1]);
bool check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Return true if y is less or equal to high.
Eigen::Matrix< T, Eigen::Dynamic, 1 > segment(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t i, size_t n)
Return the specified number of elements as a vector starting from the specified element - 1 of the sp...
bool check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Return true if y is strictly greater than low.