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>
auto xt::accumulate(F &&f, E &&e, EVS evaluation_strategy = EVS())

Accumulate and flatten array NOTE This function is not lazy!

Return

returns xarray<T> filled with accumulated values

Parameters
  • f: functor to use for accumulation

  • e: xexpression to be accumulated

  • evaluation_strategy: evaluation strategy of the accumulation

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

Accumulate over axis NOTE This function is not lazy!

Return

returns xarray<T> filled with accumulated values

Parameters
  • f: Functor to use for accumulation

  • e: xexpression to accumulate

  • axis: Axis to perform accumulation over

  • evaluation_strategy: evaluation strategy of the accumulation