2#ifndef TETL_NUMERIC_TRANSFORM_REDUCE_HPP
3#define TETL_NUMERIC_TRANSFORM_REDUCE_HPP
12template <
typename InputIt1,
typename InputIt2,
typename T,
typename BinaryReductionOp,
typename BinaryTransformOp>
22 for (; first1 != last1; ++first1, (void)++first2) {
30template <
typename InputIt1,
typename InputIt2,
typename T>
31[[nodiscard]]
constexpr auto transform_reduce(InputIt1 first1, InputIt1 last1, InputIt2 first2, T init) -> T
38template <
typename InputIt,
typename T,
typename BinaryReductionOp,
typename UnaryTransformOp>
39[[nodiscard]]
constexpr auto
42 for (; first != last; ++first) {
constexpr auto transform(InputIt first, InputIt last, OutputIt dest, UnaryOp op) -> OutputIt
Applies the given function to a range and stores the result in another range, beginning at dest....
Definition transform.hpp:24
constexpr auto reduce(InputIter first, InputIter last, T init, BinaryOp op) -> T
Similar to etl::accumulate.
Definition reduce.hpp:16
constexpr auto transform_reduce(InputIt1 first1, InputIt1 last1, InputIt2 first2, T init, BinaryReductionOp reduce, BinaryTransformOp transform) -> T
https://en.cppreference.com/w/cpp/algorithm/transform_reduce
Definition transform_reduce.hpp:13
Definition adjacent_find.hpp:8
Function object for performing multiplication. Effectively calls operator* on two instances of type T...
Definition multiplies.hpp:14
Function object for performing addition. Effectively calls operator+ on two instances of type T....
Definition plus.hpp:14