rows.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_ROWS_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_ROWS_HPP
3 
5 
6 namespace stan {
7 namespace math {
8 
9 /**
10  * Return the number of rows in the specified
11  * matrix, vector, or row vector.
12  *
13  * @tparam T Type of matrix entries.
14  * @tparam R Row type of matrix.
15  * @tparam C Column type of matrix.
16  * @param[in] m Input matrix, vector, or row vector.
17  * @return Number of rows.
18  */
19 template <typename T, int R, int C>
20 inline int rows(const Eigen::Matrix<T, R, C>& m) {
21  return m.rows();
22 }
23 
24 } // namespace math
25 } // namespace stan
26 #endif
int rows(const Eigen::Matrix< T, R, C > &m)
Definition: rows.hpp:20