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