1 #ifndef STAN__MATH__MATRIX__SUB_COL_HPP
2 #define STAN__MATH__MATRIX__SUB_COL_HPP
21 Eigen::Matrix<T,Eigen::Dynamic,1>
22 sub_col(
const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>& m,
23 size_t i,
size_t j,
size_t nrows) {
28 return m.block(i - 1,j - 1,nrows,1);
bool check_column_index(const char *function, size_t i, const Eigen::Matrix< T_y, R, C > &y, const char *name, T_result *result)
Return true if the specified index is a valid column of the matrix.
bool check_row_index(const char *function, size_t i, const Eigen::Matrix< T_y, R, C > &y, const char *name, T_result *result)
Return true if the specified index is a valid row of the matrix.
Eigen::Matrix< T, Eigen::Dynamic, 1 > sub_col(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i, size_t j, size_t nrows)
Return a nrows x 1 subcolumn starting at (i-1,j-1).