17 #ifndef OPENKALMAN_VECTOR_SPACE_TRAITS_HPP 18 #define OPENKALMAN_VECTOR_SPACE_TRAITS_HPP 20 #include <type_traits> 22 #ifdef __cpp_lib_ranges 39 template<
typename T,
typename =
void>
44 is_specialized =
false;
56 {
return std::integral_constant<std::size_t, 0_uz>{}; };
63 {
return std::integral_constant<std::size_t, 0_uz>{}; };
74 -> std::convertible_to<bool>
auto 76 {
return std::false_type {}; };
98 [](
const T& t,
auto&& data_view) noexcept
101 return std::forward<decltype(data_view)>(data_view);
111 static constexpr
auto 113 #ifdef __cpp_concepts 116 [](
const T& t,
auto&& data_view) noexcept
119 return std::forward<decltype(data_view)>(data_view);
131 static constexpr
auto 133 #ifdef __cpp_concepts 136 [](
const T& t,
auto&& data_view) noexcept
139 return std::forward<decltype(data_view)>(data_view);
148 #ifdef __cpp_concepts 149 template<values::index T>
156 static constexpr
bool is_specialized =
true;
160 static constexpr
auto 161 dimension = [](
const T& t) {
return t; };
163 static constexpr
auto 164 stat_dimension = [](
const T& t) {
return t; };
166 static constexpr
auto 167 is_euclidean = [](
const T&) {
return std::true_type {}; };
169 static constexpr
auto 170 hash_code = [](
const T& t) -> std::size_t {
return t; };
179 #endif //OPENKALMAN_VECTOR_SPACE_TRAITS_HPP Definition for values::index.
Definition: basics.hpp:41
static constexpr auto is_euclidean
A callable object returning a bool reflecting whether the coordinates::pattern object describes Eucli...
Definition: coordinate_descriptor_traits.hpp:71
Definition: tuple_reverse.hpp:103
Definition for collections::size_of.
static constexpr auto dimension
A callable object returning the number of dimensions at compile time (as a values::index).
Definition: coordinate_descriptor_traits.hpp:51
static constexpr auto stat_dimension
A callable object returning the number of dimensions after transforming to Euclidean space (as a valu...
Definition: coordinate_descriptor_traits.hpp:62
Definition for collections::collection_view.
static constexpr auto to_stat_space
A callable object mapping a range reflecting vector-space data to a corresponding range in a vector s...
Definition: coordinate_descriptor_traits.hpp:94
static constexpr auto from_stat_space
A callable object mapping a range in a vector space for directional statistics back to a range corres...
Definition: coordinate_descriptor_traits.hpp:112
constexpr bool collection_view
A view to a collection which is also a std::ranges:view.
Definition: collection_view.hpp:36
Traits for coordinates::pattern objects.
Definition: coordinate_descriptor_traits.hpp:41
Definitions implementing features of the c++ ranges library for compatibility.
constexpr bool index
T is an index value.
Definition: index.hpp:56
std::decay_t< decltype(values::to_number(std::declval< T >()))> number_type_of_t
Obtain the values::number type associated with avalues::value.
Definition: number_type_of_t.hpp:34
static constexpr auto hash_code
A callable object returning a unique hash code for type T, of type std::size_t.
Definition: coordinate_descriptor_traits.hpp:84
static constexpr auto wrap
A callable object that maps a range reflecting vector-space data to a wrapped range.
Definition: coordinate_descriptor_traits.hpp:132