![]() |
Stan Math Library
5.0.0
Automatic Differentiation
|
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.
#include <partials_return_type.hpp>
Public Types | |
using | type = promote_args_t< double, partials_type_t< scalar_type_t< T > >, typename partials_return_type< T_pack... >::type > |