Stan Math Library  2.20.0
reverse mode automatic differentiation
scalar_type.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_META_SCALAR_TYPE_HPP
2 #define STAN_MATH_PRIM_MAT_META_SCALAR_TYPE_HPP
3 
6 
7 namespace stan {
16 template <typename T, int R, int C>
17 struct scalar_type<Eigen::Matrix<T, R, C> > {
18  typedef typename scalar_type<T>::type type;
19 };
20 
29 template <typename T, int R, int C>
30 struct scalar_type<const Eigen::Matrix<T, R, C> > {
31  typedef typename scalar_type<T>::type type;
32 };
33 
42 template <typename T, int R, int C>
43 struct scalar_type<Eigen::Matrix<T, R, C>&> {
44  typedef typename scalar_type<T>::type type;
45 };
46 
55 template <typename T, int R, int C>
56 struct scalar_type<const Eigen::Matrix<T, R, C>&> {
57  typedef typename scalar_type<T>::type type;
58 };
59 
66 template <typename T>
67 struct scalar_type<Eigen::Block<T> > {
68  typedef typename scalar_type<T>::type type;
69 };
70 } // namespace stan
71 #endif
Metaprogram structure to determine the base scalar type of a template argument.
Definition: scalar_type.hpp:16
(Expert) Numerical traits for algorithmic differentiation variables.

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