Stan Math Library  2.20.0
reverse mode automatic differentiation
Public Types | List of all members
stan::partials_return_type< T, T_pack > Struct Template Reference

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
 

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.

Member Typedef Documentation

◆ type

template<typename T, typename... T_pack>
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.


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

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