16 #ifndef OPENKALMAN_VECTOR_SPACE_DESCRIPTORS_MATCH_HPP 17 #define OPENKALMAN_VECTOR_SPACE_DESCRIPTORS_MATCH_HPP 28 template<std::size_t...Is>
31 template<std::size_t...Is,
typename T,
typename...Ts>
34 return ([](
auto I_const,
const T& t,
const Ts&...ts){
35 constexpr std::size_t I = decltype(I_const)::
value;
37 }(std::integral_constant<std::size_t, Is>{}, t, ts...) and ...);
41 constexpr
bool patterns_match_dyn_impl() {
return true; }
43 template<
typename T,
typename...Ts>
44 constexpr
bool patterns_match_dyn_impl(
const T& t,
const Ts&...ts)
47 for (std::size_t i = 0; i < count; ++i)
63 template<
typename...Ts, std::enable_if_t<(indexible<Ts> and ...),
int> = 0>
67 if constexpr ((... and (index_count_v<Ts> != stdex::dynamic_extent)))
69 constexpr std::make_index_sequence<std::max({index_count_v<Ts>...})> seq;
70 return detail::patterns_match_impl(seq, ts...);
74 return detail::patterns_match_dyn_impl(ts...);
constexpr auto compare(const A &a, const B &b)
Compare two coordinates::pattern objects lexicographically.
Definition: compare.hpp:40
constexpr auto count_indices(const T &)
Get the number of indices necessary to address all the components of an indexible object...
Definition: count_indices.hpp:51
constexpr bool indexible
T is a multidimensional array type.
Definition: indexible.hpp:32
constexpr bool value
T is a fixed or dynamic value that is reducible to a number.
Definition: value.hpp:45
Definition of count_indices.
The root namespace for OpenKalman.
Definition: basics.hpp:34
constexpr bool patterns_match(const Ts &...ts)
Return true if every set of coordinates::pattern of a set of objects are equivalent.
Definition: patterns_match.hpp:65
Definition for index_count.
Definition of get_index_pattern function.
Definition: trait_backports.hpp:64
decltype(auto) constexpr get_index_pattern(T &&t, I i={})
Get the coordinates::pattern associated with indexible object T at a given index. ...
Definition: get_index_pattern.hpp:41