kumi v3.1.0
Exquisite Epidote
Loading...
Searching...
No Matches
Tuple Generators

Algorithms generating tuples. More...

Functions

template<concepts::product_type T>
constexpr auto kumi::all_unique (T &&t)
 Return the product type containing the values of the first occurence of each type in the input product type.
template<concepts::product_type T>
auto kumi::as_flat_ptr (T &&t) noexcept
 Convert a kumi::product_type to a flat product type of pointers to each its components.
template<concepts::product_type... Ts>
requires (concepts::follows_same_semantic<Ts...>)
constexpr auto kumi::cartesian_product (Ts &&... ts)
 Return the Cartesian Product of all elements of its arguments product types.
template<concepts::product_type... Ts>
requires (concepts::follows_same_semantic<Ts...>)
constexpr auto kumi::cat (Ts &&... ts)
 Concatenates product types in a single one.
template<std::size_t N, concepts::product_type T>
constexpr auto kumi::chunks (T &&t)
 Creates a kumi::tuple of product_types, each containing N consecutive elements from t. Chunks starts at 0 and advance by N element each time.
template<std::size_t I0, std::size_t I1, concepts::product_type Tuple>
constexpr auto kumi::extract (Tuple &&t, index_t< I0 > i0, index_t< I1 > i1) noexcept
 Extracts a sub-tuple from a product type.
template<std::size_t N, typename T>
constexpr auto kumi::fill (T const &v) noexcept
 Creates a kumi::tuple containing N copies of v.
template<template< typename > typename Pred, concepts::product_type T>
constexpr auto kumi::filter (T &&t) noexcept
 Filters a product type over a predicate.
template<template< typename > typename Pred, concepts::product_type T>
constexpr auto kumi::filter_not (T &&t) noexcept
 Filters a product type over a predicate.
template<concepts::product_type T>
constexpr auto kumi::flatten (T &&t)
 Converts a product type of product types into a product type of all elements.
template<concepts::product_type T, typename Func>
constexpr auto kumi::flatten_all (T &&t, Func f)
 Recursively converts a product type of product types into a product type of all elements.
template<std::size_t N, typename Function>
constexpr auto kumi::generate (Function const &f) noexcept
 Creates a kumi::tuple containing N applications of the f Callable.
template<std::size_t N, typename T>
constexpr auto kumi::iota (T v) noexcept
 Creates a kumi::tuple containing an increasing ramp of values.
template<template< typename > typename Pred, concepts::product_type T>
constexpr auto kumi::partition (T &&t) noexcept
 Partition a product type over a predicate.
template<concepts::product_type Tuple>
constexpr auto kumi::pop_back (Tuple &&t)
 Remove the last (if any) element of a kumi::product_type.
template<concepts::product_type Tuple>
constexpr auto kumi::pop_front (Tuple &&t)
 Remove the first (if any) element of a kumi::product_type.
template<concepts::product_type Tuple, typename T>
constexpr auto kumi::push_back (Tuple &&t, T &&v)
 Constructs a tuple by adding a value v at the end of t.
template<concepts::product_type Tuple, typename T>
constexpr auto kumi::push_front (Tuple &&t, T &&v)
 Constructs a tuple by adding a value v at the beginning of t.
template<concepts::index_map auto Indexes, concepts::product_type T>
constexpr auto kumi::reindex (T &&t)
 Reindex elements of a kumi::product_type.
template<std::size_t... Idx, concepts::product_type T>
constexpr auto kumi::reorder (T &&t)
 Reorder elements of a kumi::product_type.
template<concepts::identifier auto... Name, concepts::product_type Tuple>
constexpr auto kumi::reorder_fields (Tuple &&t)
 Reorder elements of a kumi::record.
template<concepts::product_type Tuple>
constexpr auto kumi::reverse (Tuple &&t)
 Reverse elements of a kumi::product_type.
template<std::size_t R, concepts::product_type T>
constexpr auto kumi::rotate_left (T &&t)
 Rotates the element of a product type R positions to the left, wrapping around when getting to the beginning.
template<std::size_t R, concepts::product_type T>
constexpr auto kumi::rotate_right (T &&t)
 Rotates the element of a product type R positions to the right, wrapping around when getting to the end.
template<std::size_t I0, concepts::product_type Tuple>
constexpr auto kumi::split (Tuple &&t, index_t< I0 > i0) noexcept
 Split a tuple into two.
template<concepts::product_type T>
requires (_::supports_transpose<T>)
constexpr auto kumi::transpose (T &&t)
 Transpose a product type of product types by shifting elements in their transposed position always returning a tuple as the external product type.
template<concepts::product_type T>
constexpr auto kumi::unique (T &&t)
 Returns a product type with consecutive duplicate types removed (pairwise uniqueness).
template<std::size_t N, concepts::product_type T>
constexpr auto kumi::windows (T &&t)
 Creates a kumi::tuple of product_types, each containing N consecutive elements from t. Windows starts at 0 and advance by 1 element each time.
template<concepts::product_type T0, concepts::sized_product_type< size_v< T0 > >... Ts>
requires (concepts::follows_same_semantic<T0, Ts...>)
constexpr auto kumi::zip (T0 &&t0, Ts &&... ts)
 Constructs a tuple where the ith element is the prduct type of all ith elements of ts...
template<concepts::product_type T0, concepts::product_type... Ts>
requires (concepts::follows_same_semantic<T0, Ts...>)
constexpr auto kumi::zip_max (T0 &&t0, Ts &&... ts)
 Constructs a tuple where the ith element is the product type of all ith elements of ts...
template<concepts::product_type T0, concepts::product_type... Ts>
requires (concepts::follows_same_semantic<T0, Ts...>)
constexpr auto kumi::zip_min (T0 &&t0, Ts &&... ts)
 Constructs a tuple where the ith element is the prudct type of all ith elements of ts...