The MultiArray concept defines a generic interface to multidimensional
containers.
<codeclass="literal">multi_array</code> is a general purpose container class
@@ -150,8 +150,8 @@ number of possible element layouts. For example, the elements of a 2
dimensional array can be stored by row (i.e., the elements of each row
are stored contiguously) or by column (i.e., the elements of each
column are stored contiguously).
</p><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="id834641"></a>Notation</h3></div></div></div><p>What follows are the descriptions of symbols that will be used
to describe the MultiArray interface.</p><divclass="table"><aname="id834650"></a><pclass="title"><b>Table1.Notation</b></p><tablesummary="Notation"border="1"><colgroup><col><col></colgroup><tbody><tr><td><codeclass="literal">A</code></td><td>A type that is a model of MultiArray
</p><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="id896773"></a>Notation</h3></div></div></div><p>What follows are the descriptions of symbols that will be used
to describe the MultiArray interface.</p><divclass="table"><aname="id896782"></a><pclass="title"><b>Table1.Notation</b></p><divclass="table-contents"><tablesummary="Notation"border="1"><colgroup><col><col></colgroup><tbody><tr><td><codeclass="literal">A</code></td><td>A type that is a model of MultiArray
</td></tr><tr><td><codeclass="literal">a,b</code></td><td>Objects of type <codeclass="literal">A</code></td></tr><tr><td><codeclass="literal">NumDims</code></td><td>The numeric dimension parameter associated with
<codeclass="literal">A</code>.</td></tr><tr><td><codeclass="literal">Dims</code></td><td>Some numeric dimension parameter such that
<codeclass="literal">0<Dims<NumDims</code>.
@@ -159,8 +159,8 @@ to describe the MultiArray interface.</p><div class="table"><a name="id834650"><
to <codeclass="literal">index_gen::operator[](index_range)</code>.</td></tr><tr><td><codeclass="literal">index_list</code></td><td>An object whose type models
</td></tr><tr><td><codeclass="literal">idx</code></td><td>A signed integral value.</td></tr><tr><td><codeclass="literal">tmp</code></td><td>An object of type
</p><divclass="table"><aname="id834817"></a><pclass="title"><b>Table2.Associated Types</b></p><tablesummary="Associated Types"border="1"><colgroup><col><col></colgroup><thead><tr><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><codeclass="literal">value_type</code></td><td>This is the value type of the container.
</p><divclass="table"><aname="id896949"></a><pclass="title"><b>Table2.Associated Types</b></p><divclass="table-contents"><tablesummary="Associated Types"border="1"><colgroup><col><col></colgroup><thead><tr><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><codeclass="literal">value_type</code></td><td>This is the value type of the container.
If <codeclass="literal">NumDims == 1</code>, then this is
<codeclass="literal">element</code>. Otherwise, this is the value type of the
immediately nested containers.
@@ -260,7 +260,9 @@ It models MultiArray.
const_array_view<Dims>::type</code>
</td><td>
This is the const view type with <codeclass="literal">Dims</code> dimensions.
</td></tr></tbody></table></div></div><brclass="table-break"></div><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="id897451"></a>Valid expressions</h3></div></div></div><divclass="table"><aname="id897455"></a><pclass="title"><b>Table3.Valid Expressions</b></p><divclass="table-contents"><tablesummary="Valid Expressions"border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Expression</th><th>Return type</th><th>Semantics</th></tr></thead><tbody><tr><td><codeclass="literal">A::dimensionality</code></td><td><codeclass="literal">size_type</code></td><td>This compile-time constant represents the number of
@@ -358,11 +360,11 @@ type must model <a href="http://www.sgi.com/tech/stl/EqualityComparable.html" ta
expression to be valid.</td></tr><tr><td><codeclass="literal">a >= b</code></td><td>bool</td><td>This performs a lexicographical comparison of the
values of <codeclass="literal">a</code> and <codeclass="literal">b</code>. The element
type must model <ahref="http://www.sgi.com/tech/stl/LessThanComparable.html"target="_top">LessThanComparable</a> for this
expression to be valid.</td></tr></tbody></table></div></div><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="id836109"></a>Complexity guarantees</h3></div></div></div><codeclass="literal">begin()</code> and <codeclass="literal">end()</code> execute in amortized
expression to be valid.</td></tr></tbody></table></div></div><brclass="table-break"></div><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="id898268"></a>Complexity guarantees</h3></div></div></div><codeclass="literal">begin()</code> and <codeclass="literal">end()</code> execute in amortized
constant time.
<codeclass="literal">size()</code> executes in at most linear time in the
MultiArray's size.
</div><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="id836133"></a>Invariants</h3></div></div></div><divclass="table"><aname="id836139"></a><pclass="title"><b>Table4.Invariants</b></p><tablesummary="Invariants"border="1"><colgroup><col><col></colgroup><tbody><tr><td>Valid range</td><td><codeclass="literal">[a.begin(),a.end())</code> is a valid range.
</div><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="id898293"></a>Invariants</h3></div></div></div><divclass="table"><aname="id898298"></a><pclass="title"><b>Table4.Invariants</b></p><divclass="table-contents"><tablesummary="Invariants"border="1"><colgroup><col><col></colgroup><tbody><tr><td>Valid range</td><td><codeclass="literal">[a.begin(),a.end())</code> is a valid range.
@@ -374,7 +376,7 @@ Calling <code class="literal">a[a1][a2]...[aN]</code> where <code class="literal
yields the same result as calling
<codeclass="literal">a(index_list)</code>, where <codeclass="literal">index_list</code>
is a <ahref="../../utility/Collection.html"target="_top">Collection</a> containing the values <codeclass="literal">a1...aN</code>.
</td></tr></tbody></table></div></div><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="view_types"></a>Associated Types for Views</h3></div></div></div><p>The following MultiArray associated
</td></tr></tbody></table></div></div><brclass="table-break"></div><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="view_types"></a>Associated Types for Views</h3></div></div></div><p>The following MultiArray associated
types define the interface for creating views of existing
MultiArrays. Their interfaces and roles in the
concept are described below.</p><divclass="sect3"lang="en"><divclass="titlepage"><div><div><h4class="title"><aname="index_range"></a><codeclass="literal">index_range</code></h4></div></div></div><p><codeclass="literal">index_range</code> objects represent half-open
@@ -401,10 +403,10 @@ operators, a half open range [5,10) can be specified as follows:
</p><divclass="table"><aname="id836367"></a><pclass="title"><b>Table5.Notation</b></p><tablesummary="Notation"border="1"><colgroup><col><col></colgroup><tbody><tr><td><codeclass="literal">i</code></td><td>An object of type <codeclass="literal">index_range</code>.</td></tr><tr><td><codeclass="literal">idx,idx1,idx2,idx3</code></td><td>Objects of type <codeclass="literal">index</code>.</td></tr></tbody></table></div><divclass="table"><aname="id836420"></a><pclass="title"><b>Table6.Associated Types</b></p><tablesummary="Associated Types"border="1"><colgroup><col><col></colgroup><thead><tr><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><codeclass="literal">index</code></td><td>This is a signed integral type. It is used to
</p><divclass="table"><aname="id898526"></a><pclass="title"><b>Table5.Notation</b></p><divclass="table-contents"><tablesummary="Notation"border="1"><colgroup><col><col></colgroup><tbody><tr><td><codeclass="literal">i</code></td><td>Anobject of type <codeclass="literal">index_range</code>.</td></tr><tr><td><codeclass="literal">idx,idx1,idx2,idx3</code></td><td>Objects of type <codeclass="literal">index</code>.</td></tr></tbody></table></div></div><brclass="table-break"><divclass="table"><aname="id898580"></a><pclass="title"><b>Table6.Associated Types</b></p><divclass="table-contents"><tablesummary="Associated Types"border="1"><colgroup><col><col></colgroup><thead><tr><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><codeclass="literal">index</code></td><td>This is a signed integral type. It is used to
specify the start, finish, and stride values.</td></tr><tr><td><codeclass="literal">size_type</code></td><td>This is an unsigned integral type. It is used to
report the size of the range an <codeclass="literal">index_range</code>
represents.</td></tr></tbody></table></div><divclass="table"><aname="id836483"></a><pclass="title"><b>Table7.Valid Expressions</b></p><tablesummary="Valid Expressions"border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Expression</th><th>Return type</th><th>Semantics</th></tr></thead><tbody><tr><td><codeclass="literal">index_range(idx1,idx2,idx3)</code></td><td><codeclass="literal">index_range</code></td><td>This constructs an <codeclass="literal">index_range</code>
represents.</td></tr></tbody></table></div></div><brclass="table-break"><divclass="table"><aname="id898642"></a><pclass="title"><b>Table7.Valid Expressions</b></p><divclass="table-contents"><tablesummary="Valid Expressions"border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Expression</th><th>Return type</th><th>Semantics</th></tr></thead><tbody><tr><td><codeclass="literal">index_range(idx1,idx2,idx3)</code></td><td><codeclass="literal">index_range</code></td><td>This constructs an <codeclass="literal">index_range</code>
representing the interval <codeclass="literal">[idx1,idx2)</code>
with stride <codeclass="literal">idx3</code>.</td></tr><tr><td><codeclass="literal">index_range(idx1,idx2)</code></td><td><codeclass="literal">index_range</code></td><td>This constructs an <codeclass="literal">index_range</code>
representing the interval <codeclass="literal">[idx1,idx2)</code>
@@ -436,14 +438,14 @@ value. This notation includes
of <codeclass="literal">i</code> up by <codeclass="literal">idx</code>. It is equivalent to
<codeclass="literal">index_range(r.start()+idx1, r.finish()+idx, r.stride())</code></td></tr><tr><td><codeclass="literal">i - idx</code></td><td><codeclass="literal">index</code></td><td>This expression shifts the start and finish values
of <codeclass="literal">i</code> up by <codeclass="literal">idx</code>. It is equivalent to
<codeclass="literal">index_range</code> objects in order to specify view
parameters. Chained calls to <codeclass="literal">operator[]</code> store
range and dimension information used to
instantiate a new view into a MultiArray.
</p><divclass="table"><aname="id837149"></a><pclass="title"><b>Table8.Notation</b></p><tablesummary="Notation"border="1"><colgroup><col><col></colgroup><tbody><tr><td><codeclass="literal">Dims,Ranges</code></td><td>Unsigned integral values.</td></tr><tr><td><codeclass="literal">x</code></td><td>An object of type
</p><divclass="table"><aname="id899309"></a><pclass="title"><b>Table8.Notation</b></p><divclass="table-contents"><tablesummary="Notation"border="1"><colgroup><col><col></colgroup><tbody><tr><td><codeclass="literal">Dims,Ranges</code></td><td>Unsigned integral values.</td></tr><tr><td><codeclass="literal">x</code></td><td>An object of type
<codeclass="literal">template gen_type<Dims,Ranges>::type</code>.</td></tr><tr><td><codeclass="literal">i</code></td><td>An object of type
<codeclass="literal">index_range</code>.</td></tr><tr><td><codeclass="literal">idx</code></td><td>Objects of type <codeclass="literal">index</code>.</td></tr></tbody></table></div><divclass="table"><aname="id837235"></a><pclass="title"><b>Table9.Associated Types</b></p><tablesummary="Associated Types"border="1"><colgroup><col><col></colgroup><thead><tr><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><codeclass="literal">index</code></td><td>This is a signed integral type. It is used to
<codeclass="literal">index_range</code>.</td></tr><tr><td><codeclass="literal">idx</code></td><td>Objects of type <codeclass="literal">index</code>.</td></tr></tbody></table></div></div><brclass="table-break"><divclass="table"><aname="id899395"></a><pclass="title"><b>Table9.Associated Types</b></p><divclass="table-contents"><tablesummary="Associated Types"border="1"><colgroup><col><col></colgroup><thead><tr><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><codeclass="literal">index</code></td><td>This is a signed integral type. It is used to
specify degenerate dimensions.</td></tr><tr><td><codeclass="literal">size_type</code></td><td>This is an unsigned integral type. It is used to
report the size of the range an <codeclass="literal">index_range</code>
represents.</td></tr><tr><td>
@@ -454,7 +456,7 @@ represents.</td></tr><tr><td>
degenerate ranges specified (i.e. calls to
<codeclass="literal">operator[](index)</code>). Note that
<codeclass="classname">index_gen</code> and
<codeclass="classname">gen_type<0,0>::type</code> are the same type.</td></tr></tbody></table></div><divclass="table"><aname="id837347"></a><pclass="title"><b>Table10.Valid Expressions</b></p><tablesummary="Valid Expressions"border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Expression</th><th>Return type</th><th>Semantics</th></tr></thead><tbody><tr><td><codeclass="literal">index_gen()</code></td><td><codeclass="literal">gen_type<0,0>::type</code></td><td>This constructs an <codeclass="literal">index_gen</code>
<codeclass="classname">gen_type<0,0>::type</code> are the same type.</td></tr></tbody></table></div></div><brclass="table-break"><divclass="table"><aname="id899506"></a><pclass="title"><b>Table10.Valid Expressions</b></p><divclass="table-contents"><tablesummary="Valid Expressions"border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Expression</th><th>Return type</th><th>Semantics</th></tr></thead><tbody><tr><td><codeclass="literal">index_gen()</code></td><td><codeclass="literal">gen_type<0,0>::type</code></td><td>This constructs an <codeclass="literal">index_gen</code>
object. This object can then be used to generate tuples of
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.