16 #ifndef OPENKALMAN_IS_UNIFORM_COMPONENT_OF_HPP 17 #define OPENKALMAN_IS_UNIFORM_COMPONENT_OF_HPP 36 template<pattern A, pattern B>
37 constexpr OpenKalman::internal::boolean_testable
auto 39 template<
typename A,
typename B, std::enable_if_t<pattern<A> and pattern<B>,
int> = 0>
42 is_uniform_pattern_component_of(
const A& a,
const B& b)
44 if constexpr (not uniform_pattern<B, applicability::permitted>)
46 return std::false_type {};
48 else if constexpr (euclidean_pattern<B>)
50 return compare(a, Dimensions<1>{});;
54 using C = common_descriptor_type_t<B>;
55 if constexpr (compares_with<A, C, &stdex::is_eq, applicability::guaranteed>)
59 else if constexpr (compares_with<A, C, &stdex::is_neq, applicability::guaranteed> or
60 (dimension_of_v<C> != stdex::dynamic_extent and dimension_of_v<C> != 1))
62 return std::false_type {};
74 if constexpr (descriptor<B>)
84 if (not
compare(a, x))
return false;
Definition for compares_with.
constexpr auto compare(const A &a, const B &b)
Compare two coordinates::pattern objects lexicographically.
Definition: compare.hpp:40
Definition for coordinates::pattern.
constexpr auto get_dimension(const Arg &arg)
Get the vector dimension of coordinates::pattern Arg.
Definition: get_dimension.hpp:54
Definition of coordinates::compare.
constexpr auto get_is_euclidean(const Arg &arg)
Determine, whether coordinates::pattern Arg is euclidean.
Definition: get_is_euclidean.hpp:65
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.
constexpr auto operation(Operation &&op, Args &&...args)
A potentially constant-evaluated operation involving some number of values.
Definition: operation.hpp:98