Kiwaku 0.1-beta
Containers Well Made
 
Loading...
Searching...
No Matches

◆ linear_index() [1/3]

template<auto... S, kwk::concepts::range Indexes>
requires ( !kumi::sized_product_type<Indexes,shape<S...>::static_order> )
constexpr auto kwk::linear_index ( shape< S... > const &  sh,
Indexes const &  indexes 
)
constexprnoexcept

Computes a linear index from a range of N indexes.

Parameters
shShape used as a reference
indexesRange of integer representing the order N index to linearize
Returns
The linear index equivalent to (indexes[0], ...) for the current shape