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

◆ reduce()

template<typename T >
template<typename T2 , typename F >
static auto stan::math::apply_vector_unary< T, require_eigen_t< T > >::reduce ( T2 &&  x,
F &&  f 
)
inlinestatic

Member function for applying a functor to a vector and subsequently returning a scalar.

The reduction to a scalar 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
xEigen input to which operation is applied.
ffunctor to apply to Eigen input.
Returns
scalar result of applying functor to input.

Definition at line 103 of file apply_vector_unary.hpp.