![]() |
Stan Math Library
2.20.0
reverse mode automatic differentiation
|
Template metaprogram to calculate the partial derivative type resulting from promoting all the scalar types of the template parameters. More...
#include <partials_return_type.hpp>
Public Types | |
typedef boost::math::tools::promote_args< double, typename partials_type< typename scalar_type< T >::type >::type, typename partials_return_type< T_pack... >::type >::type | type |
Template metaprogram to calculate the partial derivative type resulting from promoting all the scalar types of the template parameters.
The metaprogram can take an arbitrary number of template parameters.
All C++ primitive types (except long double
) are automatically promoted to double
.
partials_return_type<...>
is a class defining a single public typedef type
that is var
if there is a forward mode variable type and is double
otherwise (this is the most common case). Example usage:
return_type<int,double,var>::type
is double
var
replaced with a forward mode type like fvar<T>
will return T
.T | (required) A type |
T_pack | (optional) A parameter pack containing further types. |
Definition at line 33 of file partials_return_type.hpp.
typedef boost::math::tools::promote_args< double, typename partials_type<typename scalar_type<T>::type>::type, typename partials_return_type<T_pack...>::type>::type stan::partials_return_type< T, T_pack >::type |
Definition at line 36 of file partials_return_type.hpp.