Stan Math Library  2.20.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 
7 namespace stan {
8 namespace math {
19 template <typename T1, typename T2, int R, int C>
20 struct common_type<Eigen::Matrix<T1, R, C>, Eigen::Matrix<T2, R, C> > {
21  typedef Eigen::Matrix<typename common_type<T1, T2>::type, R, C> type;
22 };
23 
24 } // namespace math
25 } // namespace stan
26 
27 #endif
Struct which calculates type promotion given two types.
Definition: common_type.hpp:25
(Expert) Numerical traits for algorithmic differentiation variables.
Eigen::Matrix< typename common_type< T1, T2 >::type, R, C > type
Definition: common_type.hpp:21

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