| Stan Math Library 2.11.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

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

Public Types | Static Public Member Functions | List of all members
stan::math::apply_scalar_unary< F, int > Struct Template Reference

Template specialization for vectorized functions applying to integer arguments. More...

`#include <apply_scalar_unary.hpp>`

## Public Types
typedef double | return_t
| The return type, double. More...

## Static Public Member Functions
static return_t | apply (int x)
| Apply the function specified by F to the specified argument. More...

## Detailed Description

### template<typename F>
struct stan::math::apply_scalar_unary< F, int >

Template specialization for vectorized functions applying to integer arguments.

Although the argument is integer, the return type is specified as double. This allows promotion of integers to doubles in vectorized functions, or in containers.

Template Parameters

  F | Type of function defining static apply function.

Definition at line 103 of file apply_scalar_unary.hpp.

## Member Typedef Documentation

template<typename F >

typedef double stan::math::apply_scalar_unary< F, int >::return_t

The return type, double.

Definition at line 107 of file apply_scalar_unary.hpp.

## Member Function Documentation

template<typename F >

static return_t stan::math::apply_scalar_unary< F, int >::apply | ( | int | x | ) |
| inlinestatic

Apply the function specified by F to the specified argument.

This is defined through a direct application of `F::fun()`, which must be defined for double arguments.

Parameters

  x | Argument scalar.

Returns
  Result of applying F to the scalar.

Definition at line 118 of file apply_scalar_unary.hpp.

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

- stan/math/prim/mat/vectorize/apply_scalar_unary.hpp

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