OpenKalman
Typedefs | Variables
OpenKalman::collections::views Namespace Reference

Namespace for generalized views. More...

Typedefs

template<typename R , std::enable_if_t< viewable_collection< R >, int > = 0>
using all_t = decltype(all(std::declval< R >()))
 Calculates the suitable collection_view type of a viewable_collection type. More...
 

Variables

constexpr detail::all_closure all
 a std::ranges::range_adaptor_closure which returns a view to all members of its collection argument. More...
 
constexpr detail::concat_adaptor concat
 a std::ranges::range_adaptor_closure for a set of concatenated collection objects.
 
constexpr detail::generate_adaptor generate
 a collection_view generator associated with generate_view. More...
 
constexpr detail::iota_adapter iota
 a RangeAdapterObject associated with iota_view. More...
 
constexpr detail::repeat_adaptor repeat
 a std::ranges::range_adaptor_closure for a set of repeatenated collection objects.
 
constexpr detail::replicate_adaptor replicate
 a std::ranges::range_adaptor_closure associated with replicate_view. More...
 
constexpr detail::slice_adapter slice
 a RangeAdapterObject associated with slice_view. More...
 
constexpr detail::update_adaptor update
 a std::ranges::range_adaptor_closure associated with update_view. More...
 

Detailed Description

Namespace for generalized views.

Typedef Documentation

◆ all_t

template<typename R , std::enable_if_t< viewable_collection< R >, int > = 0>
using OpenKalman::collections::views::all_t = typedef decltype(all(std::declval<R>()))

Calculates the suitable collection_view type of a viewable_collection type.

This is rougly equivalent to std::ranges::views::all, except in the context of a collection

Variable Documentation

◆ all

constexpr detail::all_closure OpenKalman::collections::views::all
inline

a std::ranges::range_adaptor_closure which returns a view to all members of its collection argument.

Examples:

static_assert(equal_to{}(views::all{std::tuple{4, 5.}}, std::tuple{4, 5.}));
static_assert(equal_to{}(std::tuple{4, 5.}, views::all(std::tuple{4, 5.})));
static_assert(equal_to{}(views::all(std::vector{4, 5, 6}), std::vector{4, 5, 6}));
static_assert(equal_to{}(std::array{4, 5, 6}, views::all(std::array{4, 5, 6})));

◆ generate

constexpr detail::generate_adaptor OpenKalman::collections::views::generate
inline

a collection_view generator associated with generate_view.

The expression views::generate(f, s) is expression-equivalent to generate_view(f, s).

See also
generate_view

◆ iota

constexpr detail::iota_adapter OpenKalman::collections::views::iota
inline

a RangeAdapterObject associated with iota_view.

The expression views::iota(arg) is expression-equivalent to iota_view(arg) for any suitable collection arg.

See also
iota_view

◆ replicate

constexpr detail::replicate_adaptor OpenKalman::collections::views::replicate
inline

a std::ranges::range_adaptor_closure associated with replicate_view.

The expression views::replicate{f}(arg) is expression-equivalent to replicate_view(arg, f) for any suitable viewable_collection arg.

See also
replicate_view

◆ slice

constexpr detail::slice_adapter OpenKalman::collections::views::slice
inline

a RangeAdapterObject associated with slice_view.

The expression views::slice(arg) is expression-equivalent to slice_view(arg) for any suitable collection arg.

See also
slice_view

◆ update

constexpr detail::update_adaptor OpenKalman::collections::views::update
inline

a std::ranges::range_adaptor_closure associated with update_view.

The expression views::update(arg, f) is expression-equivalent to update_view(views::all(arg), f) for any suitable viewable_collection arg.

See also
update_view