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__MATRIX__PROMOTE_SCALAR_TYPE_HPP
2 #define STAN__MATH__MATRIX__PROMOTE_SCALAR_TYPE_HPP
3 
4 #include <vector>
7 
8 namespace stan {
9 
10  namespace math {
11 
22  template <typename T, typename S>
23  struct promote_scalar_type<T, Eigen::Matrix<S,Eigen::Dynamic,Eigen::Dynamic> > {
24 
28  typedef Eigen::Matrix<typename promote_scalar_type<T,S>::type,
29  Eigen::Dynamic, Eigen::Dynamic>
31 
32  };
33 
34 
43  template <typename T, typename S>
44  struct promote_scalar_type<T, Eigen::Matrix<S,Eigen::Dynamic,1> > {
45 
49  typedef Eigen::Matrix<typename promote_scalar_type<T,S>::type,
50  Eigen::Dynamic, 1>
52 
53  };
54 
55 
64  template <typename T, typename S>
65  struct promote_scalar_type<T, Eigen::Matrix<S,1,Eigen::Dynamic> > {
66 
70  typedef Eigen::Matrix<typename promote_scalar_type<T,S>::type,
71  1, Eigen::Dynamic>
73 
74  };
75 
76 
77  }
78 
79 }
80 
81 #endif
Eigen::Matrix< typename promote_scalar_type< T, S >::type, 1, Eigen::Dynamic > type
The promoted type.
Template metaprogram to calculate a type for converting a convertible type.
Eigen::Matrix< typename promote_scalar_type< T, S >::type, Eigen::Dynamic, Eigen::Dynamic > type
The promoted type.
Eigen::Matrix< typename promote_scalar_type< T, S >::type, Eigen::Dynamic, 1 > type
The promoted type.

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