16 #ifndef OPENKALMAN_GET_INDEX_EXTENT_HPP 17 #define OPENKALMAN_GET_INDEX_EXTENT_HPP 29 template<indexible T, values::index I = std::
integral_constant<std::
size_t, 0>>
32 template<
typename T,
typename I = std::
integral_constant<std::
size_t, 0>,
33 std::enable_if_t<indexible<T> and values::index<I>,
int> = 0>
40 return std::integral_constant<std::size_t, 1>{};
44 constexpr
auto ex = std::decay_t<decltype(get_mdspan(t))>::static_extent(i);
45 if constexpr (ex == stdex::dynamic_extent)
46 return get_mdspan(t).extent(static_cast<std::size_t>(i));
48 return std::integral_constant<std::size_t, ex>{};
52 return get_mdspan(t).extent(static_cast<std::size_t>(i));
65 template<std::
size_t I, indexible T>
68 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
Definition of count_indices.
constexpr auto get_index_extent(T &&t, I i=I{})
Get the runtime dimensions of index N of indexible T.
Definition: get_index_extent.hpp:36
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.
constexpr bool index
T is an index value.
Definition: index.hpp:62
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