| Stan Math Library 2.6.3 probability, sampling & optimization

- Main Page
- Namespaces
- Classes
- Files

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

All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
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 22 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 34 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–2015, Stan Development Team.