16 #ifndef OPENKALMAN_SQUARE_SHAPED_HPP 17 #define OPENKALMAN_SQUARE_SHAPED_HPP 19 #include "patterns/patterns.hpp" 27 template<auto N,
typename T>
32 if constexpr (std::same_as<std::decay_t<decltype(N)>, values::unbounded_size_t>)
38 return
std::max(2_uz, index_count_v<T>);
46 #ifndef __cpp_concepts 47 template<
typename T, applicability b,
typename =
void>
50 template<
typename T, applicability b>
52 interface::object_traits<stdex::remove_cvref_t<T>>::template is_square<b>>>
56 template<
typename T, auto N, applicability b,
typename =
void>
59 template<
typename T, auto N, applicability b>
61 patterns::collection_patterns_have_same_dimension<typename pattern_collection_type_of<T>::type, N_adjusted<N, T>(), b>>>
80 template<
typename T, auto N = values::unbounded_size, applicability b = applicability::guaranteed>
85 (not interface::is_square_defined_for<T, b> or
87 (interface::is_square_defined_for<T, b> or
90 template<
typename T, std::
size_t N = values::unbounded_size, applicability b = applicability::guaranteed>
91 constexpr
bool square_shaped =
94 (interface::is_square_defined_for<T, b> ?
95 detail::is_explicitly_square<T, b>::
value :
96 detail::same_pattern_dimensions<T, N, b>::
value);
typename pattern_collection_type_of< T >::type pattern_collection_type_of_t
helper template for pattern_collection_type_of.
Definition: pattern_collection_type_of.hpp:55
Definition for pattern_collection_type_of.
constexpr bool square_shaped
At least 2 and at most N indices have the same extent.
Definition: square_shaped.hpp:91
Definition: square_shaped.hpp:57
constexpr bool value
T is a fixed or dynamic value that is reducible to a number.
Definition: value.hpp:45
constexpr bool collection_patterns_have_same_dimension
Specifies that the first N elements of a pattern_collection have the same dimensions.
Definition: collection_patterns_have_same_dimension.hpp:121
The root namespace for OpenKalman.
Definition: basics.hpp:34
Forward declaration of object_traits, which must be defined for all objects used in OpenKalman...
Definition: object_traits.hpp:38
A type reflecting an unbound size.
Definition: size.hpp:27
Definition: square_shaped.hpp:48
constexpr bool integral
T is an integral value.
Definition: integral.hpp:47
constexpr unbounded_size_t unbounded_size
An instance of unbounded_size_t;.
Definition: size.hpp:60
constexpr bool fixed
T has a value that is determinable at compile time.
Definition: fixed.hpp:65