Stan Math Library  2.15.0
reverse mode automatic differentiation
common_type.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_COMMON_TYPE_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_COMMON_TYPE_HPP
3 
6 #include <boost/math/tools/promotion.hpp>
7 
8 namespace stan {
9  namespace math {
20  template <typename T1, typename T2, int R, int C>
21  struct common_type<Eigen::Matrix<T1, R, C>, Eigen::Matrix<T2, R, C> > {
22  typedef Eigen::Matrix<typename common_type<T1, T2>::type, R, C> type;
23  };
24 
25  }
26 }
27 
28 #endif
Struct which calculates type promotion given two types.
Definition: common_type.hpp:24
(Expert) Numerical traits for algorithmic differentiation variables.
Eigen::Matrix< typename common_type< T1, T2 >::type, R, C > type
Definition: common_type.hpp:22

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