xaccumulator

Defined in xtensor/xaccumulator.hpp

template<class F, class E, class EVS = evaluation_strategy::immediate_type, xtl::check_concept<is_evaluation_strategy<EVS>> = 0>
inline auto xt::accumulate(F &&f, E &&e, EVS evaluation_strategy = EVS())

Accumulate and flatten array NOTE This function is not lazy!

Parameters
  • f – functor to use for accumulation

  • e – xexpression to be accumulated

  • evaluation_strategy – evaluation strategy of the accumulation

Returns

returns xarray<T> filled with accumulated values

template<class F, class E, class EVS = evaluation_strategy::immediate_type>
inline auto xt::accumulate(F &&f, E &&e, std::ptrdiff_t axis, EVS evaluation_strategy = EVS())

Accumulate over axis NOTE This function is not lazy!

Parameters
  • f – Functor to use for accumulation

  • e – xexpression to accumulate

  • axis – Axis to perform accumulation over

  • evaluation_strategy – evaluation strategy of the accumulation

Returns

returns xarray<T> filled with accumulated values