2#ifndef TETL_NUMERIC_REDUCE_HPP
3#define TETL_NUMERIC_REDUCE_HPP
15template <
typename InputIter,
typename T,
typename BinaryOp>
16[[nodiscard]]
constexpr auto reduce(InputIter first, InputIter last, T init, BinaryOp op) -> T
24template <
typename InputIter,
typename T>
25[[nodiscard]]
constexpr auto reduce(InputIter first, InputIter last, T init) -> T
33template <
typename InputIter>
34[[nodiscard]]
constexpr auto reduce(InputIter first, InputIter last) ->
38 return reduce(first, last, init);
constexpr auto reduce(InputIter first, InputIter last, T init, BinaryOp op) -> T
Similar to etl::accumulate.
Definition reduce.hpp:16
constexpr auto accumulate(InputIt first, InputIt last, Type init) noexcept -> Type
Computes the sum of the given value init and the elements in the range [first, last).
Definition accumulate.hpp:13
Definition adjacent_find.hpp:8
iterator_traits is the type trait class that provides uniform interface to the properties of LegacyIt...
Definition iterator_traits.hpp:47
Function object for performing addition. Effectively calls operator+ on two instances of type T....
Definition plus.hpp:14