Automatic Differentiation
 
Loading...
Searching...
No Matches
stan::math::apply_vector_unary< T, require_eigen_t< T > > Struct Template Reference

Detailed Description

template<typename T>
struct stan::math::apply_vector_unary< T, require_eigen_t< T > >

Base template class for vectorization of unary vector functions defined by applying a functor to a standard library vector, Eigen dense matrix expression template, or container of these.

For each specialization, the same vector type as the input is returned.

Two taxonomies of unary vector functions are implemented:

  • f(vector) -> vector
  • f(vector) -> scalar

This base template class takes (and returns) Eigen expression templates.

Definition at line 32 of file apply_vector_unary.hpp.

#include <apply_vector_unary.hpp>

Static Public Member Functions

template<typename F , typename T2 = T, require_t< is_eigen_matrix_base< plain_type_t< T2 > > > * = nullptr>
static auto apply (const T &x, const F &f)
 Member function for applying a functor to a vector and subsequently returning a vector.
 
template<typename F , typename T2 = T, require_t< is_eigen_array< plain_type_t< T2 > > > * = nullptr>
static auto apply (const T &x, const F &f)
 
template<typename F , typename T2 = T, require_t< is_eigen_matrix_base< plain_type_t< T2 > > > * = nullptr>
static auto apply_no_holder (const T &x, const F &f)
 Member function for applying a functor to a vector and subsequently returning a vector.
 
template<typename F , typename T2 = T, require_t< is_eigen_array< plain_type_t< T2 > > > * = nullptr>
static auto apply_no_holder (const T &x, const F &f)
 
template<typename F >
static auto reduce (const T &x, const F &f)
 Member function for applying a functor to a vector and subsequently returning a scalar.
 

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