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_ARR_META_SCALAR_TYPE_HPP
2 #define STAN_MATH_PRIM_ARR_META_SCALAR_TYPE_HPP
3 
5 #include <vector>
6 
7 namespace stan {
8 template <typename T>
9 struct scalar_type<std::vector<T> > {
10  typedef typename scalar_type<T>::type type;
11 };
12 
13 template <typename T>
14 struct scalar_type<const std::vector<T> > {
15  typedef typename scalar_type<T>::type type;
16 };
17 
18 template <typename T>
19 struct scalar_type<std::vector<T>&> {
20  typedef typename scalar_type<T>::type type;
21 };
22 
23 template <typename T>
24 struct scalar_type<const std::vector<T>&> {
25  typedef typename scalar_type<T>::type type;
26 };
27 } // namespace stan
28 #endif
Metaprogram structure to determine the base scalar type of a template argument.
Definition: scalar_type.hpp:16

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