Automatic Differentiation
 
Loading...
Searching...
No Matches
col.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_COL_HPP
2#define STAN_MATH_PRIM_FUN_COL_HPP
3
6
7namespace stan {
8namespace math {
9
23template <typename T, require_matrix_t<T>* = nullptr>
24inline auto col(const T& m, size_t j) {
25 check_column_index("col", "j", m, j);
26 return m.col(j - 1);
27}
28
29} // namespace math
30} // namespace stan
31
32#endif
auto col(T_x &&x, size_t j)
Return the specified column of the specified kernel generator expression using start-at-1 indexing.
Definition col.hpp:23
void check_column_index(const char *function, const char *name, const T_y &y, size_t i)
Check if the specified index is a valid column of the matrix.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9