Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
promote_scalar_type.hpp
Go to the documentation of this file.
1 #ifndef STAN__MATH__FUNCTIONS__PROMOTE_SCALAR_TYPE_HPP
2 #define STAN__MATH__FUNCTIONS__PROMOTE_SCALAR_TYPE_HPP
3 
4 #include <vector>
5 
6 namespace stan {
7 
8  namespace math {
9 
10 
18  template <typename T, typename S>
20 
24  typedef T type;
25 
26  };
27 
28 
37  template <typename T, typename S>
38  struct promote_scalar_type<T, std::vector<S> > {
39 
43  typedef std::vector<typename promote_scalar_type<T,S>::type> type;
44 
45  };
46 
47 
48  }
49 
50 }
51 
52 #endif
Template metaprogram to calculate a type for converting a convertible type.
std::vector< typename promote_scalar_type< T, S >::type > type
The promoted type.

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