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

◆ reduce()

template<typename T >
template<typename F >
static auto stan::math::apply_vector_unary< T, require_eigen_t< T > >::reduce ( const T &  x,
const 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 92 of file apply_vector_unary.hpp.