| Stan Math Library 2.11.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

promote_scalar_type.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_PROMOTE_SCALAR_TYPE_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_PROMOTE_SCALAR_TYPE_HPP
3
4 #include <stan/math/prim/scal/fun/promote_scalar_type.hpp>
5 #include <stan/math/prim/mat/fun/Eigen.hpp>
6 #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,
24 Eigen::Dynamic> > {
28 typedef Eigen::Matrix<typename promote_scalar_type<T, S>::type,
29 Eigen::Dynamic, Eigen::Dynamic>
30 type;
31 };
32
33
42 template <typename T, typename S>
43 struct promote_scalar_type<T, Eigen::Matrix<S, Eigen::Dynamic, 1> > {
47 typedef Eigen::Matrix<typename promote_scalar_type<T, S>::type,
48 Eigen::Dynamic, 1>
49 type;
50 };
51
52
61 template <typename T, typename S>
62 struct promote_scalar_type<T, Eigen::Matrix<S, 1, Eigen::Dynamic> > {
66 typedef Eigen::Matrix<typename promote_scalar_type<T, S>::type,
67 1, Eigen::Dynamic>
68 type;
69 };
70
71
72 }
73
74 }
75
76 #endif
stan
Definition: log_sum_exp.hpp:8
Eigen
(Expert) Numerical traits for algorithmic differentiation variables.
Definition: Eigen_NumTraits.hpp:8
stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, 1 > >::type
Eigen::Matrix< typename promote_scalar_type< T, S >::type, Eigen::Dynamic, 1 > type
The promoted type.
Definition: promote_scalar_type.hpp:49
stan::math::promote_scalar_type
Template metaprogram to calculate a type for converting a convertible type.
Definition: promote_scalar_type.hpp:15
stan::math::promote_scalar_type< T, Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic > >::type
Eigen::Matrix< typename promote_scalar_type< T, S >::type, Eigen::Dynamic, Eigen::Dynamic > type
The promoted type.
Definition: promote_scalar_type.hpp:30
stan::math::promote_scalar_type< T, Eigen::Matrix< S, 1, Eigen::Dynamic > >::type
Eigen::Matrix< typename promote_scalar_type< T, S >::type, 1, Eigen::Dynamic > type
The promoted type.
Definition: promote_scalar_type.hpp:68
promote_scalar_type.hpp
Eigen.hpp

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