50 lines
1.9 KiB
Markdown
50 lines
1.9 KiB
Markdown
[mdspan.overview]
|
||
|
||
# 23 Containers library [[containers]](./#containers)
|
||
|
||
## 23.7 Views [[views]](views#mdspan.overview)
|
||
|
||
### 23.7.3 Multidimensional access [[views.multidim]](views.multidim#mdspan.overview)
|
||
|
||
#### 23.7.3.1 Overview [mdspan.overview]
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L20993)
|
||
|
||
A [*multidimensional index space*](#def:index_space,multidimensional "23.7.3.1 Overview [mdspan.overview]") is
|
||
a Cartesian product of integer intervals[.](#1.sentence-1)
|
||
|
||
Each interval can be represented by a half-open range [Li,Ui),
|
||
where Li and Ui are the lower and upper bounds of
|
||
the ith dimension[.](#1.sentence-2)
|
||
|
||
The [*rank*](#def:rank "23.7.3.1 Overview [mdspan.overview]") of a multidimensional index space is
|
||
the number of intervals it represents[.](#1.sentence-3)
|
||
|
||
The [*size of a multidimensional index space*](#def:size_of_a_multidimensional_index_space "23.7.3.1 Overview [mdspan.overview]") is
|
||
the product of UiâLi for each dimension i if its rank is greater than 0, and 1 otherwise[.](#1.sentence-4)
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L21005)
|
||
|
||
An integer r is a [*rank index*](#def:rank_index "23.7.3.1 Overview [mdspan.overview]") of an index space S if r is in the range [0,rank of S)[.](#2.sentence-1)
|
||
|
||
[3](#3)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L21009)
|
||
|
||
A pack of integers idx is
|
||
a [*multidimensional index*](#def:index,multidimensional "23.7.3.1 Overview [mdspan.overview]") in a multidimensional index space S (or representation thereof) if both of the following are true:
|
||
|
||
- [(3.1)](#3.1)
|
||
|
||
sizeof...(idx) is equal to the rank of S, and
|
||
|
||
- [(3.2)](#3.2)
|
||
|
||
for every rank index i of S,
|
||
the ith value of idx is an integer
|
||
in the interval [Li,Ui) of S[.](#3.sentence-1)
|