Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
col.hpp
Go to the documentation of this file.
1 #ifndef STAN__MATH__MATRIX__COL_HPP
2 #define STAN__MATH__MATRIX__COL_HPP
3 
6 
7 namespace stan {
8  namespace math {
9 
21  template <typename T>
22  inline
23  Eigen::Matrix<T,Eigen::Dynamic,1>
24  col(const Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>& m,
25  size_t j) {
26  stan::math::check_column_index("col(%1%)",j,m,"j",(double*)0);
27  return m.col(j - 1);
28  }
29 
30  }
31 }
32 #endif
bool check_column_index(const char *function, size_t i, const Eigen::Matrix< T_y, R, C > &y, const char *name, T_result *result)
Return true if the specified index is a valid column of the matrix.
Eigen::Matrix< T, Eigen::Dynamic, 1 > col(const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &m, size_t j)
Return the specified column of the specified matrix using start-at-1 indexing.
Definition: col.hpp:24

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