| Stan Math Library 2.6.3 probability, sampling & optimization

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
row.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ROW_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_ROW_HPP
3
4 #include <stan/math/prim/mat/fun/Eigen.hpp>
5 #include <stan/math/prim/mat/err/check_row_index.hpp>
6
7 namespace stan {
8 namespace math {
9
22 template <typename T>
23 inline
24 Eigen::Matrix<T, 1, Eigen::Dynamic>
25 row(const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>& m,
26 size_t i) {
27 stan::math::check_row_index("row", "j", m, i);
28
29 return m.row(i - 1);
30 }
31
32 }
33 }
34 #endif
stan::math::check_row_index
bool check_row_index(const char *function, const char *name, const Eigen::Matrix< T_y, R, C > &y, size_t i)
Return true if the specified index is a valid row of the matrix.
Definition: check_row_index.hpp:32
check_row_index.hpp
stan::math::row
Eigen::Matrix< T, 1, Eigen::Dynamic > row(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t i)
Return the specified row of the specified matrix, using start-at-1 indexing.
Definition: row.hpp:25
Eigen.hpp

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