|
OpenKalman
|
Namespace for collections. More...
Namespaces | |
| detail_sized | |
| An object (std::ranges::sized_range, std::tuple, std::span, etc.) that has a discernible size. | |
| views | |
| Namespace for generalized views. | |
Typedefs | |
| template<std::size_t i, typename T > | |
| using | collection_element_t = typename collection_element< i, T >::type |
| Helper template for collection_element. | |
| template<typename T > | |
| using | common_collection_type_t = typename common_collection_type< T >::type |
| Helper template for common_collection_type. | |
Functions | |
| template<typename F , typename T , std::enable_if_t< collection< T > and values::fixed_value_compares_with< size_of< T >, stdex::dynamic_extent, &stdex::is_neq >, int > = 0> | |
| decltype(auto) constexpr | apply (F &&f, T &&t) |
| A generalization of std::apply. More... | |
| template<auto comp = &stdex::is_eq, typename Lhs , typename Rhs , std::enable_if_t< index< Lhs > and index< Rhs > and(sized< Lhs > or sized< Rhs >), int > = 0> | |
| constexpr auto | compare_indices (const Lhs &lhs, const Rhs &rhs) |
| Performs an element-by-element comparison of two index collections. More... | |
| template<typename Arg , typename I , std::enable_if_t< values::index< I > and(not values::size_compares_with< I, size_of< Arg >, &stdex::is_gteq >) and(stdex::ranges::random_access_range< Arg > or detail_get::has_member_get_function< Arg, I >::value or detail_get::has_adl_get_function< Arg, I >::value), int > = 0> | |
| decltype(auto) constexpr | get_element (Arg &&arg, I i) |
| A generalization of std::get and the range subscript operator. More... | |
| template<typename Arg , std::enable_if_t< sized< Arg >, int > = 0> | |
| constexpr auto | get_size (Arg &&arg) |
| Get the size of a sized object (e.g, a collection) | |
| template<typename Arg , std::enable_if_t< uniformly_gettable< Arg >, int > = 0> | |
| constexpr auto | tuple_flatten (Arg &&arg) |
| template<typename Arg > | |
| tuple_reverse_view (Arg &&) -> tuple_reverse_view< Arg > | |
| Deduction guide. | |
| template<typename Arg , std::enable_if_t< uniformly_gettable< Arg >, int > = 0> | |
| constexpr auto | tuple_reverse (Arg &&arg) |
| Reverses the order of a uniformly_gettable object. | |
| template<typename T , std::enable_if_t< uniformly_gettable< T > and stdex::default_initializable< T >, int > = 0> | |
| constexpr auto | tuple_reverse () |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename Lhs , typename Rhs , std::enable_if_t< collection< Lhs > and collection< Rhs > and(collection_view< Lhs > or collection_view< Rhs >) and(sized< Lhs > or sized< Rhs >), int > = 0> | |
| constexpr stdex::partial_ordering | lexicographical_compare_three_way (const Lhs &lhs, const Rhs &rhs) |
| Compares two collections. More... | |
| template<typename... Args> | |
| concat_tuple_view (Args &&...) -> concat_tuple_view< Args... > | |
| Deduction guide. | |
| template<typename V > | |
| from_range (V &&) -> from_range< V > | |
| Deduction guide. | |
| template<typename Tup > | |
| from_tuple_like (Tup &&) -> from_tuple_like< Tup > | |
| template<typename F , typename S > | |
| generate_view (F, S) -> generate_view< F, S > | |
| Deduction guide. | |
| template<typename F > | |
| generate_view (F) -> generate_view< F > | |
| template<typename Start , typename Size > | |
| iota_view (const Start &, const Size &) -> iota_view< Start, Size > | |
| Deduction guide. | |
| template<typename Start > | |
| iota_view (const Start &) -> iota_view< Start > | |
| Deduction guide for an unsized iota. | |
| template<typename V , typename F > | |
| replicate_view (const V &, const F &) -> replicate_view< V, F > | |
| Deduction guide. | |
| template<typename V , typename O , typename E > | |
| slice_view (const V &, const O &, const E &) -> slice_view< V, O, E > | |
| Deduction guide. | |
Variables | |
| template<typename T > | |
| constexpr bool | collection |
| An object describing a collection of objects. More... | |
| template<typename T > | |
| constexpr bool | collection_view |
| A view to a collection which is also a std::ranges:view. More... | |
| template<std::size_t i, typename T > | |
| constexpr bool | gettable = detail::gettable_impl<i, T>::value |
| T has an element i that is accessible by collections::get. | |
| template<typename T > | |
| constexpr bool | index |
| An object describing a collection of /ref values::index objects. More... | |
| template<typename F , typename C , typename... Args> | |
| constexpr bool | invocable_on_collection |
| Callable object F is invocable on each element of collection C, with additional parameters Args. More... | |
| template<typename C , typename T > | |
| constexpr bool | output_collection |
| A collection that can be modified on an element-by-element basis. More... | |
| template<std::size_t i, typename C , typename T > | |
| constexpr bool | settable = detail::settable_impl<i, C, T>::value |
| C has an element i that can be set by assigning the result of a get(...) function to an object of type T. More... | |
| template<typename T > | |
| constexpr bool | tuple_like = detail::is_tuple_like<std::decay_t<T>>::value |
| T is a non-empty tuple, pair, array, or other type that acts like a tuple. More... | |
| template<typename T > | |
| constexpr bool | uniformly_gettable |
| T is a fixed-size object that is gettable for all indices. More... | |
| template<typename C , typename T > | |
| constexpr bool | uniformly_settable |
| C is settable with type C for all indices. More... | |
| template<typename T > | |
| constexpr bool | viewable_collection |
| A std::range or viewable_tuple_like object that can be converted into a collection_view by passing it to collections::views::all. More... | |
| template<typename T > | |
| constexpr bool | viewable_tuple_like |
| A uniformly_gettable object that has a common_collection_type and can be converted into a collection_view by passing it to collections::views::all. More... | |
| template<std::size_t i> | |
| constexpr detail_get::get_impl< i > | get |
| A generalization of std::get, where the index is known at compile time. More... | |
| template<typename T > | |
| constexpr std::size_t | size_of_v = size_of<T>::value |
| Helper for collections::size_of. | |
Namespace for collections.
| decltype(auto) constexpr OpenKalman::collections::apply | ( | F && | f, |
| T && | t | ||
| ) |
A generalization of std::apply.
This function takes a fixed-size collection and applies its elements as arguments of a function.
| constexpr auto OpenKalman::collections::compare_indices | ( | const Lhs & | lhs, |
| const Rhs & | rhs | ||
| ) |
Performs an element-by-element comparison of two index collections.
If one argument is longer than the other, the comparison will ignore the tail of the longer argument.
| comp | A callable object taking the comparison result (e.g., std::partial_ordering) and returning a bool value |
| OpenKalman::collections::generate_view | ( | F | ) | -> generate_view< F > |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| decltype(auto) constexpr OpenKalman::collections::get_element | ( | Arg && | arg, |
| I | i | ||
| ) |
A generalization of std::get and the range subscript operator.
This function works like std::get except that it works with any collection. The index can either be a template parameter constant or an argument. The function works as follows:
get<i*gt;() member, call that member.get<i*gt;(std::forward<Arg>(arg)) if such a function is found using ADL.std::get<i*gt;(std::forward<Arg>(arg)) if it is defined.std::ranges::begin(std::forward<Arg>(arg)) if it is a valid call. | constexpr stdex::partial_ordering OpenKalman::collections::lexicographical_compare_three_way | ( | const Lhs & | lhs, |
| const Rhs & | rhs | ||
| ) |
Compares two collections.
This is the default case in which at least one of the arguments is a collection_view.
| constexpr bool OpenKalman::collections::collection |
An object describing a collection of objects.
This is either a uniforly gettable object or a std::ranges::random_access_range. It need not be sized.
| constexpr bool OpenKalman::collections::collection_view |
A view to a collection which is also a std::ranges:view.
|
inline |
A generalization of std::get, where the index is known at compile time.
| constexpr bool OpenKalman::collections::index |
An object describing a collection of /ref values::index objects.
| constexpr bool OpenKalman::collections::invocable_on_collection |
Callable object F is invocable on each element of collection C, with additional parameters Args.
| constexpr bool OpenKalman::collections::output_collection |
A collection that can be modified on an element-by-element basis.
| constexpr bool OpenKalman::collections::settable = detail::settable_impl<i, C, T>::value |
C has an element i that can be set by assigning the result of a get(...) function to an object of type T.
The get(...) function can be std::get<i>(...), a get(...) member function, or a separately-defined matching get(...) function in T's namespace.
| constexpr bool OpenKalman::collections::tuple_like = detail::is_tuple_like<std::decay_t<T>>::value |
T is a non-empty tuple, pair, array, or other type that acts like a tuple.
T has defined specializations for std::tuple_size and std::tuple_element, and the elements of T can be accessible by std::get(...), a get(...) member function, or an atd-findable get(...) function.
|
inline |
T is a fixed-size object that is gettable for all indices.
| constexpr bool OpenKalman::collections::uniformly_settable |
C is settable with type C for all indices.
If C is not sized or has dynamic size, then it must be settable for at least index 0.
| constexpr bool OpenKalman::collections::viewable_collection |
A std::range or viewable_tuple_like object that can be converted into a collection_view by passing it to collections::views::all.
|
inline |
A uniformly_gettable object that has a common_collection_type and can be converted into a collection_view by passing it to collections::views::all.
1.8.13