Stan Math Library  2.20.0
reverse mode automatic differentiation
is_vector.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_META_IS_VECTOR_HPP
2 #define STAN_MATH_PRIM_MAT_META_IS_VECTOR_HPP
3 
6 
7 namespace stan {
8 
9 // FIXME: use boost::type_traits::remove_all_extents to
10 // extend to array/ptr types
11 
12 template <typename T>
13 struct is_vector<Eigen::Matrix<T, Eigen::Dynamic, 1> > {
14  enum { value = 1 };
15  typedef T type;
16 };
17 template <typename T>
18 struct is_vector<Eigen::Matrix<T, 1, Eigen::Dynamic> > {
19  enum { value = 1 };
20  typedef T type;
21 };
22 template <typename T>
23 struct is_vector<Eigen::Block<T> > {
24  enum { value = 1 };
25  typedef T type;
26 };
27 } // namespace stan
28 #endif
(Expert) Numerical traits for algorithmic differentiation variables.

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