Stan Math Library  2.20.0
reverse mode automatic differentiation
is_column_index.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_IS_COLUMN_INDEX_HPP
2 #define STAN_MATH_PRIM_MAT_ERR_IS_COLUMN_INDEX_HPP
3 
6 
7 namespace stan {
8 namespace math {
9 
21 template <typename T_y, int R, int C>
22 inline bool is_column_index(const Eigen::Matrix<T_y, R, C>& y, size_t i) {
23  return i >= stan::error_index::value
24  && i < static_cast<size_t>(y.cols()) + stan::error_index::value;
25 }
26 
27 } // namespace math
28 } // namespace stan
29 #endif
bool is_column_index(const Eigen::Matrix< T_y, R, C > &y, size_t i)
Return true no index is invalid column.

     [ Stan Home Page ] © 2011–2018, Stan Development Team.