| Stan Math Library 2.12.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

  T | return type of nested static function.
  S | input 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

template<typename T , typename S >

static T stan::math::promote_scalar_struct< T, S >::apply | ( | S | x | ) |
| inline static

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

  x | input 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/math/prim/scal/fun/promote_scalar.hpp

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