KUMI v4.0.0
Flawless Fluorite
Loading...
Searching...
No Matches
Helper Types and function

Utilities to manipulate functions and types in a functional way. More...

Classes

struct  kumi::function::adjacent_unicity_t
 Logic provider to compute the index map associated to the adjacent unicity operation. More...
class  kumi::function::boolean_and
 A type representing the logical and monoid and it's associated identity. The identity of the boolean_and is true. More...
class  kumi::function::boolean_or
 A type representing the logical or monoid and it's associated identity. The identity of boolean_or is false. More...
class  kumi::function::boolean_xor
 A type representing the logical xor monoid and it's associated identity. The identity of boolean_xor is false. More...
struct  kumi::function::element_or< I, T, U >
 If T is a kumi::product_type and I is within it's size, returns element_t<I,T>, returns U otherwise. More...
class  kumi::function::foldable< T >
 Functional wrapper for values to facilitate pipelined transformations. More...
class  kumi::function::numeric_add
 A type representing the addition monoid with it's associated identity. The identity of the addition is 0. More...
class  kumi::function::numeric_prod
 A type representing the multiplication monoid with it's associated identity. The identity of the multiplication is 1. More...
class  kumi::function::scannable< F, V >
 Functional wrapper that accumulates state during a transformation chain. More...
struct  kumi::function::select_t
 Logic provider to compute the index map associated to the partition operation. More...
struct  kumi::function::size_or< T, V >
 If T is a kumi::product_type, returns its number of elements otherwise returns V;. More...
struct  kumi::function::unique_t
 Logic provider to compute the index map associated to the all_unique operation. More...

Functions

template<typename C, typename... Ts>
requires (std::is_move_constructible_v<std::decay_t<C>> && (std::is_move_constructible_v<std::decay_t<Ts>> && ...))
constexpr auto kumi::bind_back (C &&c, Ts &&... ts) noexcept(std::is_nothrow_move_constructible_v< std::decay_t< C > > &&(std::is_nothrow_move_constructible_v< std::decay_t< Ts > > &&...))
 Binds a certain amount of values into a callable reducing it's arity.
template<typename C, typename... Ts>
requires (std::is_move_constructible_v<std::decay_t<C>> && (std::is_move_constructible_v<std::decay_t<Ts>> && ...))
constexpr auto kumi::bind_front (C &&c, Ts &&... ts) noexcept(std::is_nothrow_move_constructible_v< std::decay_t< C > > &&(std::is_nothrow_move_constructible_v< std::decay_t< Ts > > &&...))
 Binds a certain amount of values into a callable reducing it's arity.
template<std::size_t I, typename T, typename V>
constexpr decltype(auto) kumi::function::get_or (T &&t, V &&v)
 If T is a kumi::product_type, returns it's Ith element, returns an instance of V otherwise.
template<typename C, typename... Ts>
constexpr decltype(auto) kumi::invoke (C &&c, Ts &&... ts)
 Invoke the Callable object c with a pack of arguments.
template<typename R, typename C, typename... Ts>
requires (std::is_invocable_r_v<R, C, Ts...>)
constexpr R kumi::invoke_r (C &&c, Ts &&... ts) noexcept(std::is_nothrow_invocable_r_v< R, C, Ts... >)
 Invoke the Callable object c with a pack of arguments with return type R.

Variables

constexpr kumi::function::boolean_and kumi::function::bit_and {}
 Forms a binary monoid callable that can be used in kumi::algoritm. It represents the logical and operation.
constexpr kumi::function::boolean_or kumi::function::bit_or {}
 Forms a binary monoid callable that can be used in kumi::algoritm. It represents the logical or operation.
constexpr kumi::function::boolean_xor kumi::function::bit_xor {}
 Forms a binary monoid callable that can be used in kumi::algoritm. It represents the logical xor operation.
struct kumi::function::cartesian_product_t kumi::function::cartesian_producer
 Callable object computing the index map associated to the cartesian product operation.
struct kumi::function::cat_t kumi::function::concatenater
 Callable object computing the index map associated to the concatenation operation.
struct kumi::function::extract_t kumi::function::extractor
 Callable object computing the index map associated to the extraction operation.
constexpr kumi::function::numeric_prod kumi::function::multiplies {}
 Forms a binary monoid callable that can be used in kumi::algoritm. It represents the multiplication.
constexpr kumi::function::numeric_add kumi::function::plus {}
 Forms a binary monoid callable that can be used in kumi::algoritm. It represents the addition.
struct kumi::function::reduce_t kumi::function::reducer
 Callable object computing the index map associated to the reduction operation.
struct kumi::function::repeat_t kumi::function::repeater
 Callable object generating an index sequence repeating a constant index.
struct kumi::function::reverse_t kumi::function::reverser
 Callable object computing the reversed index sequence.
struct kumi::function::rotate_t kumi::function::rotater
 Callable object computing the index map associated to the rotation operation.
constexpr kumi::function::select_t kumi::function::selector {}
 Callable object computing the index map associated to the selection operation.
struct kumi::function::shift_t kumi::function::shifter
 Callable object computing linear indexing translations.
struct kumi::function::slice_t kumi::function::slicer
 Callable object computing the index map associated to a slicing (begin, end, step) operation.
struct kumi::function::split_t kumi::function::splitter
 Callable object computing underlying index sequences of the input domain divided in two parts.
struct kumi::function::tile_t kumi::function::tiler
 Callable object computing multi-dimensional window block layout configurations.
constexpr kumi::function::adjacent_unicity_t kumi::function::uniqued {}
 Callable object computing the index map associated to the adjactent unicity operation.
constexpr kumi::function::unique_t kumi::function::uniquer {}
 Callable object computing the index map associated to the deduplication operation.
struct kumi::function::zip_t kumi::function::zipper
 Callable object creating the index sequence corresponding to the zip operation.