Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ reduce()

template<typename T >
template<typename F >
static var stan::math::apply_vector_unary< T, require_var_matrix_t< T > >::reduce ( const T &  x,
const F &  f 
)
inlinestatic

Member function for applying a functor to a var_value<T> and subsequently returning a var.

The reduction to a var needs to be implemented in the definition of the functor.

Template Parameters
TType of argument to which functor is applied.
FType of functor to apply.
Parameters
xinput to which operation is applied.
ffunctor to apply to input.
Returns
scalar result of applying functor to input.

Definition at line 59 of file apply_vector_unary.hpp.