Stan Math Library  2.15.0
reverse mode automatic differentiation
Public Types | Static Public Member Functions | List of all members
stan::math::apply_scalar_unary< F, std::vector< T > > Struct Template Reference

Template specialization for vectorized functions applying to standard vector containers. More...

#include <apply_scalar_unary.hpp>

Public Types

typedef std::vector< typename apply_scalar_unary< F, T >::return_treturn_t
 Return type, which is calculated recursively as a standard vector of the return type of the contained type T. More...
 

Static Public Member Functions

static return_t apply (const std::vector< T > &x)
 Apply the function specified by F elementwise to the specified argument. More...
 

Detailed Description

template<typename F, typename T>
struct stan::math::apply_scalar_unary< F, std::vector< T > >

Template specialization for vectorized functions applying to standard vector containers.

The lowest-level scalar type of the argument will determine the return type. Integers are promoted to double values.

Template Parameters
FClass defining a static apply function.
TType of element contained in standard vector.

Definition at line 132 of file apply_scalar_unary.hpp.

Member Typedef Documentation

§ return_t

template<typename F , typename T >
typedef std::vector<typename apply_scalar_unary<F, T>::return_t> stan::math::apply_scalar_unary< F, std::vector< T > >::return_t

Return type, which is calculated recursively as a standard vector of the return type of the contained type T.

Definition at line 138 of file apply_scalar_unary.hpp.

Member Function Documentation

§ apply()

template<typename F , typename T >
static return_t stan::math::apply_scalar_unary< F, std::vector< T > >::apply ( const std::vector< T > &  x)
inlinestatic

Apply the function specified by F elementwise to the specified argument.

This is defined recursively through this class applied to elements of type T.

Parameters
xArgument container.
Returns
Elementwise application of F to the elements of the container.

Definition at line 149 of file apply_scalar_unary.hpp.


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

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