Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
row.hpp
Go to the documentation of this file.
1 #ifndef STAN__MATH__MATRIX__ROW_HPP
2 #define STAN__MATH__MATRIX__ROW_HPP
3 
7 
8 namespace stan {
9  namespace math {
10 
23  template <typename T>
24  inline
25  Eigen::Matrix<T,1,Eigen::Dynamic>
26  row(const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>& m,
27  size_t i) {
28  stan::math::check_greater_or_equal("row(%1%)",i,1U,"i",(double*)0);
29  stan::math::check_less_or_equal("row(%1%)",i,static_cast<size_t>(m.rows()),"i",(double*)0);
30  return m.row(i - 1);
31  }
32 
33  }
34 }
35 #endif
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:26
bool check_less_or_equal(const char *function, const T_y &y, const T_high &high, const char *name, T_result *result)
bool check_greater_or_equal(const char *function, const T_y &y, const T_low &low, const char *name, T_result *result)

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