16 #ifndef OPENKALMAN_GET_INDEX_PATTERN_HPP 17 #define OPENKALMAN_GET_INDEX_PATTERN_HPP 19 #include "coordinates/coordinates.hpp" 34 template<indexible T, values::index I = std::
integral_constant<std::
size_t, 0>>
37 template<
typename T,
typename I = std::
integral_constant<std::
size_t, 0>,
38 std::enable_if_t<indexible<T> and values::index<I>,
int> = 0>
39 constexpr decltype(
auto)
47 else if constexpr (interface::get_pattern_collection_defined_for<std::remove_reference_t<T>>)
50 using Pat = decltype(pat);
62 constexpr
auto ex = std::decay_t<decltype(get_mdspan(t))>::static_extent(i);
63 if constexpr (ex == stdex::dynamic_extent)
64 return get_mdspan(t).extent(static_cast<std::size_t>(i));
70 return get_mdspan(t).extent(static_cast<std::size_t>(i));
83 template<std::
size_t i, indexible T>
86 template<std::
size_t i,
typename T, std::enable_if_t<indexible<T>,
int> = 0>
constexpr auto get_mdspan(T &t)
Get the coordinates::pattern_collection associated with indexible object T.
Definition: get_mdspan.hpp:35
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 pattern
An object describing the set of coordinates associated with a tensor index.
Definition: pattern.hpp:31
decltype(auto) constexpr get_pattern_collection(T &&t)
Get the coordinates::pattern_collection associated with indexible object T.
Definition: get_pattern_collection.hpp:59
The size of a sized object (including a collection).
Definition: size_of.hpp:33
Definition of count_indices.
The root namespace for OpenKalman.
Definition: basics.hpp:34
Definition of get_mdspan function.
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
Definition for index_count.
A structure representing the dimensions associated with of a particular index.
Definition: Dimensions.hpp:42
Definition of get_pattern_collection function.
decltype(auto) constexpr get_element(Arg &&arg, I i)
A generalization of std::get and the range subscript operator.
Definition: get_element.hpp:122
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
The minimum number of indices needed to access all the components of an object (i.e., the rank or order).
Definition: index_count.hpp:34
Concepts for testing whether object_traits or library_interface definitions exist for a particular ob...
constexpr auto get_size(Arg &&arg)
Get the size of a sized object (e.g, a collection)
Definition: get_size.hpp:188