kumi v3.1.0
Exquisite Epidote
Loading...
Searching...
No Matches
Tuple Generalized Reductions

Algorithms performing reductions over tuples. More...

Functions

template<concepts::product_type T>
constexpr auto kumi::bit_and (T &&t)
 Computes the bitwise AND of all elements.
template<concepts::product_type T, typename Value>
constexpr auto kumi::bit_and (T &&t, Value init)
 Computes the bitwise AND of all elements.
template<concepts::product_type T>
constexpr auto kumi::bit_or (T &&t)
 Computes the bitwise OR of all elements.
template<concepts::product_type T, typename Value>
constexpr auto kumi::bit_or (T &&t, Value init)
 Computes the bitwise OR of all elements.
template<concepts::product_type T>
constexpr auto kumi::bit_xor (T &&t)
 Computes the bitwise XOR of all elements.
template<concepts::product_type T, typename Value>
constexpr auto kumi::bit_xor (T &&t, Value init)
 Computes the bitwise XOR of all elements.
template<typename Function, concepts::product_type T, typename Value>
constexpr auto kumi::exclusive_scan_left (Function f, T &&t, Value init)
 Computes the exclusive prefix scan of all elements of a product type using a tail recursive call.
template<concepts::monoid M, concepts::sized_product_type_or_more< 1 > T>
constexpr auto kumi::exclusive_scan_left (M &&m, T &&t)
 Computes the exclusive prefix scan of all elements of a product type using a tail recursive call.
template<typename Function, concepts::product_type T, typename Value>
constexpr auto kumi::exclusive_scan_right (Function f, T &&t, Value init)
 Computes the exclusive suffix scan of all elements of a product type using a tail recursive call.
template<concepts::monoid M, concepts::sized_product_type_or_more< 1 > T>
constexpr auto kumi::exclusive_scan_right (M &&m, T &&t)
 Computes the exclusive suffix scan of all elements of a product type using a non-tail recursive call.
template<typename Function, concepts::sized_product_type_or_more< 1 > T>
constexpr auto kumi::fold_left (Function f, T &&t)
 Computes the generalized associative combination of all elements using a tail recursive call.
template<typename Function, concepts::product_type T, typename Value>
constexpr auto kumi::fold_left (Function f, T &&t, Value init)
 Computes the generalized combination of all elements using a tail recursive call.
template<typename Function, concepts::sized_product_type_or_more< 1 > T>
constexpr auto kumi::fold_right (Function f, T &&t)
 Computes the generalized associative combinationof all elements using a non-tail recursive call.
template<typename Function, concepts::product_type T, typename Value>
constexpr auto kumi::fold_right (Function f, T &&t, Value init)
 Computes the generalized combination of all elements using a non-tail recursive call.
template<typename Function, concepts::product_type T, typename Value>
constexpr auto kumi::inclusive_scan_left (Function f, T &&t, Value init)
 Computes the inclusive prefix scan of all elements of a product type using a tail recursive call.
template<concepts::monoid M, concepts::sized_product_type_or_more< 1 > T>
constexpr auto kumi::inclusive_scan_left (M &&m, T &&t)
 Computes the inclusive prefix scan of all elements of a product type using a tail recursive call.
template<typename Function, concepts::product_type T, typename Value>
constexpr auto kumi::inclusive_scan_right (Function f, T &&t, Value init)
 Computes the inclusive suffix scan of all elements of a product type using a non-tail recursive call.
template<concepts::monoid M, concepts::sized_product_type_or_more< 1 > T>
constexpr auto kumi::inclusive_scan_right (M &&m, T &&t)
 Computes the inclusive suffix scan of all elements of a product type using a non-tail recursive call.
template<concepts::product_type S1, concepts::sized_product_type< size_v< S1 > > S2, typename T, typename Sum, typename Prod>
constexpr auto kumi::inner_product (S1 &&s1, S2 &&s2, T init, Sum sum, Prod prod) noexcept
 Computes inner product (i.e. sum of products).
template<concepts::product_type T, concepts::monoid M, typename Function>
constexpr auto kumi::map_reduce (Function f, M &&m, T &&t)
 Performs a tree-like reduction of all elements of a product type. The given map function is applied before excution the reduction to each element of the input.
template<concepts::monoid M, concepts::product_type T, typename Function, typename Value>
constexpr auto kumi::map_reduce (Function f, M &&m, T &&t, Value init)
 Performs a tree-like reduction of all elements of a product type. The given map function is applied before excution the reduction to each element of the input.
template<concepts::product_type T>
constexpr auto kumi::max (T &&t) noexcept
 Computes the maximum value all elements of t.
template<concepts::product_type T, typename F>
constexpr auto kumi::max (T &&t, F f) noexcept
 Computes the maximum value of applications of f to all elements of t.
template<concepts::product_type T, typename F>
constexpr auto kumi::max_flat (T &&t, F f) noexcept
 Computes the maximum value of applications of f to all elements of kumi::flatten_all(t).
template<concepts::product_type T>
constexpr auto kumi::min (T &&t) noexcept
 Computes the minimum value all elements of t.
template<concepts::product_type T, typename F>
constexpr auto kumi::min (T &&t, F f) noexcept
 Computes the minimum value of applications of f to all elements of t.
template<concepts::product_type T, typename F>
constexpr auto kumi::min_flat (T &&t, F f) noexcept
 Computes the minimum value of applications of f to all elements of kumi::flatten_all(t).
template<concepts::product_type T>
constexpr auto kumi::prod (T &&t)
 Computes the product of all elements.
template<concepts::product_type T, typename Value>
constexpr auto kumi::prod (T &&t, Value init)
 Computes the product of all elements.
template<concepts::monoid M, concepts::product_type T>
constexpr auto kumi::reduce (M &&m, T &&t)
 Performs a tree-like reduction of all elements of a product type.
template<concepts::monoid M, concepts::product_type T, typename Value>
constexpr auto kumi::reduce (M &&m, T &&t, Value init)
 Performs a tree-like reduction of all elements of a product type.
template<concepts::product_type T>
constexpr auto kumi::sum (T &&t)
 Computes the sum of all elements.
template<concepts::product_type T, typename Value>
constexpr auto kumi::sum (T &&t, Value init)
 Computes the sum of all elements.