16 #ifndef OPENKALMAN_COORDINATES_VIEWS_DIMENSIONS_HPP 17 #define OPENKALMAN_COORDINATES_VIEWS_DIMENSIONS_HPP 31 static_assert(collections::uniformly_gettable<T>);
34 #ifdef __cpp_lib_concepts 37 template<
bool Enable = true, std::enable_if_t<Enable and stdex::default_initializable<T>,
int> = 0>
42 #ifdef __cpp_lib_concepts 43 template<
typename Arg> requires std::constructible_from<T, Arg&&>
45 template<
typename Arg, std::enable_if_t<stdex::constructible_from<T, Arg&&>,
int> = 0>
53 template<std::
size_t i>
54 friend constexpr decltype(
auto)
55 get(const dimensions_tuple_view& v)
57 if constexpr (i < collections::size_of_v<T>)
60 return std::integral_constant<std::size_t, 1>{};
68 friend constexpr decltype(
auto)
71 if constexpr (i < collections::size_of_v<T>)
74 return std::integral_constant<std::size_t, 1>{};
88 struct tuple_size<
OpenKalman::coordinates::dimensions_tuple_view<T>>
92 template<std::
size_t i,
typename T>
93 struct tuple_element<i, OpenKalman::coordinates::dimensions_tuple_view<T>>
104 #ifdef __cpp_concepts 105 template<pattern_collection P> requires collections::viewable_collection<P> or collections::uniformly_gettable<P>
107 template<
typename P, std::enable_if_t<pattern_collection<P> and
108 (collections::viewable_collection<P> or collections::uniformly_gettable<P>),
int> = 0>
111 operator() (P&& p)
const 113 if constexpr (collections::viewable_collection<P>)
119 return std::integral_constant<std::size_t, 1>{};
Definition for pattern_collection.
The size of a sized object (including a collection).
Definition: size_of.hpp:33
The size of a coordinates::pattern.
Definition: dimension_of.hpp:36
constexpr auto get_dimension(const Arg &arg)
Get the vector dimension of coordinates::pattern Arg.
Definition: get_dimension.hpp:54
The root namespace for OpenKalman.
Definition: basics.hpp:34
The namespace for features relating to coordinates::pattern object.
Definition: compares_with.hpp:25
constexpr detail::all_closure all
a std::ranges::range_adaptor_closure which returns a view to all members of its collection argument...
Definition: all.hpp:72
Inclusion file for collections.
The namespace for views for coordinates::pattern object.
Definition: coordinates.hpp:51
A view to the dimensions of a uniformly_gettable pattern_collection.
Definition: dimensions.hpp:29
constexpr bool size_compares_with
T and U are sizes that compare in a particular way based on parameter comp.
Definition: size_compares_with.hpp:98
constexpr detail::generate_adaptor generate
a collection_view generator associated with generate_view.
Definition: generate.hpp:335
frienddecltype(auto) constexpr get(const dimensions_tuple_view &v)
Get element i of a dimensions_tuple_view.
Definition: dimensions.hpp:55
Definition for coordinates::get_dimension.
constexpr detail::dimensions_adaptor dimensions
a std::ranges::range_adaptor_closure for the dimensions of a pattern_collection.
Definition: dimensions.hpp:149
decltype(auto) constexpr get_element(Arg &&arg, I i)
A generalization of std::get and the range subscript operator.
Definition: get_element.hpp:122
Definition: dimensions.hpp:102
constexpr auto get_size(Arg &&arg)
Get the size of a sized object (e.g, a collection)
Definition: get_size.hpp:188