Stan Math Library
2.20.0
reverse mode automatic differentiation
stan
math
prim
mat
err
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
4
#include <
stan/math/prim/meta.hpp
>
5
#include <
stan/math/prim/mat/fun/Eigen.hpp
>
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
stan
Definition:
log_sum_exp.hpp:8
meta.hpp
stan::error_index::value
Definition:
error_index.hpp:8
Eigen.hpp
stan::math::is_column_index
bool is_column_index(const Eigen::Matrix< T_y, R, C > &y, size_t i)
Return true no index is invalid column.
Definition:
is_column_index.hpp:22
[
Stan Home Page
]
© 2011–2018, Stan Development Team.