Automatic Differentiation
 
Loading...
Searching...
No Matches
stan::partials_return_type< T, T_pack > Struct Template Reference

Detailed Description

template<typename T, typename... T_pack>
struct stan::partials_return_type< T, T_pack >

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:

Template Parameters
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 >
 

The documentation for this struct was generated from the following file: