Stan Math Library  2.14.0
reverse mode automatic differentiation
Static Public Member Functions | List of all members
stan::math::promote_scalar_struct< T, S > Struct Template Reference

General struct to hold static function for promoting underlying scalar types. More...

#include <promote_scalar.hpp>

Static Public Member Functions

static T apply (S x)
 Return the value of the input argument promoted to the type specified by the template parameter. More...
 

Detailed Description

template<typename T, typename S>
struct stan::math::promote_scalar_struct< T, S >

General struct to hold static function for promoting underlying scalar types.

Template Parameters
Treturn type of nested static function.
Sinput type for nested static function, whose underlying scalar type must be assignable to T.

Definition at line 19 of file promote_scalar.hpp.

Member Function Documentation

§ apply()

template<typename T , typename S >
static T stan::math::promote_scalar_struct< T, S >::apply ( x)
inlinestatic

Return the value of the input argument promoted to the type specified by the template parameter.

This is the base case for mismatching template parameter types in which the underlying scalar type of template parameter S is assignable to type T.

Parameters
xinput of type S.
Returns
input promoted to have scalars of type T.

Definition at line 31 of file promote_scalar.hpp.


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

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