The MultiArray concept defines a generic interface to multidimensional
containers.
<codeclass="literal">multi_array</code> is a general purpose container class
@@ -11,7 +11,7 @@ you can manipulate any block of contiguous data as though it were a
<codeclass="literal">multi_array_ref</code> in that its elements cannot
be modified through its interface. Finally, several auxiliary classes are used
to create and specialize arrays and some global objects are defined as
part of the library interface.</p><divclass="sect1"lang="en"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aname="synopsis"></a>Library Synopsis</h2></div></div></div><p>To use Boost.MultiArray, you must include the header
part of the library interface.</p><divclass="sect1"title="Library Synopsis"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aname="synopsis"></a>Library Synopsis</h2></div></div></div><p>To use Boost.MultiArray, you must include the header
<codeclass="filename">boost/multi_array.hpp</code> in your source. This file
brings the following declarations into scope:</p><preclass="programlisting">
namespace boost {
@@ -52,7 +52,7 @@ namespace boost {
template <std::size_t NumDims> class general_storage_order;
concept defines an interface to hierarchically nested
containers. It specifies operations for accessing elements,
traversing containers, and creating views
@@ -150,17 +150,23 @@ 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="id835332"></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="id835342"></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
</p><p>
Two concept checking classes for the MultiArray concepts
(<codeclass="literal">ConstMultiArrayConcept</code> and
<codeclass="literal">MutableMultiArrayConcept</code>) are in the namespace
<codeclass="literal">boost::multi_array_concepts</code> in
</p><divclass="sect2"title="Notation"><divclass="titlepage"><div><div><h3class="title"><aname="idp18427760"></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="idp18428768"></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>.
</td></tr><tr><td><codeclass="literal">indices</code></td><td>An object created by some number of chained calls
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="id835508"></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.
</p><divclass="table"><aname="idp18447104"></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.
@@ -192,15 +198,17 @@ iterators. It is the same type as
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="id836010"></a>Valid expressions</h3></div></div></div><divclass="table"><aname="id836014"></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
</td></tr></tbody></table></div></div><brclass="table-break"></div><divclass="sect2"title="Valid expressions"><divclass="titlepage"><div><div><h3class="title"><aname="idp18501744"></a>Valid expressions</h3></div></div></div><divclass="table"><aname="idp18502256"></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
This returns a list of <codeclass="literal">NumDims</code> elements specifying the
@@ -345,26 +353,26 @@ This expression generates a view of the array determined by the
used to construct <codeclass="literal">indices</code>.
</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/EqualityComparable.html"target="_top">EqualityComparable</a> for this
type must model <aclass="ulink" href="http://www.sgi.com/tech/stl/EqualityComparable.html"target="_top">EqualityComparable</a> for this
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
type must model <aclass="ulink" href="http://www.sgi.com/tech/stl/LessThanComparable.html"target="_top">LessThanComparable</a> for this
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/EqualityComparable.html"target="_top">EqualityComparable</a> and
<ahref="http://www.sgi.com/tech/stl/LessThanComparable.html"target="_top">LessThanComparable</a> for this
type must model <aclass="ulink" href="http://www.sgi.com/tech/stl/EqualityComparable.html"target="_top">EqualityComparable</a> and
<aclass="ulink" href="http://www.sgi.com/tech/stl/LessThanComparable.html"target="_top">LessThanComparable</a> for this
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/EqualityComparable.html"target="_top">EqualityComparable</a> and
<ahref="http://www.sgi.com/tech/stl/LessThanComparable.html"target="_top">LessThanComparable</a> for this
type must model <aclass="ulink" href="http://www.sgi.com/tech/stl/EqualityComparable.html"target="_top">EqualityComparable</a> and
<aclass="ulink" href="http://www.sgi.com/tech/stl/LessThanComparable.html"target="_top">LessThanComparable</a> for this
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><brclass="table-break"></div><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="id836828"></a>Complexity guarantees</h3></div></div></div><codeclass="literal">begin()</code> and <codeclass="literal">end()</code> execute in amortized
type must model <aclass="ulink" href="http://www.sgi.com/tech/stl/LessThanComparable.html"target="_top">LessThanComparable</a> for this
expression to be valid.</td></tr></tbody></table></div></div><brclass="table-break"></div><divclass="sect2"title="Complexity guarantees"><divclass="titlepage"><div><div><h3class="title"><aname="idp18588736"></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="id836852"></a>Invariants</h3></div></div></div><divclass="table"><aname="id836858"></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.
</div><divclass="sect2"title="Invariants"><divclass="titlepage"><div><div><h3class="title"><aname="idp18591264"></a>Invariants</h3></div></div></div><divclass="table"><aname="idp18591904"></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.
Calling <codeclass="literal">a[a1][a2]...[aN]</code> where <codeclass="literal">N==NumDims</code>
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><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
is a <aclass="ulink" href="../../utility/Collection.html"target="_top">Collection</a> containing the values <codeclass="literal">a1...aN</code>.
</td></tr></tbody></table></div></div><brclass="table-break"></div><divclass="sect2"title="Associated Types for Views"><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
concept are described below.</p><divclass="sect3"title="index_range"><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
strided intervals. They are aggregated (using an
<codeclass="literal">index_gen</code> object) and passed to
a MultiArray's <codeclass="literal">operator[]</code>
@@ -403,10 +411,10 @@ operators, a half open range [5,10) can be specified as follows:
</p><divclass="table"><aname="id837086"></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>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></div><brclass="table-break"><divclass="table"><aname="id837139"></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
</p><divclass="table"><aname="idp18614960"></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>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></div><brclass="table-break"><divclass="table"><aname="idp18620944"></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></div><brclass="table-break"><divclass="table"><aname="id837202"></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>
represents.</td></tr></tbody></table></div></div><brclass="table-break"><divclass="table"><aname="idp18627920"></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>
@@ -438,14 +446,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="id837868"></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
</p><divclass="table"><aname="idp18699808"></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></div><brclass="table-break"><divclass="table"><aname="id837954"></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
<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="idp18709408"></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>
@@ -456,7 +464,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></div><brclass="table-break"><divclass="table"><aname="id838066"></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>
<codeclass="classname">gen_type<0,0>::type</code> are the same type.</td></tr></tbody></table></div></div><brclass="table-break"><divclass="table"><aname="idp18721296"></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
</span></dt><dd><p>This changes the index bases of the <codeclass="literal">multi_array</code> to
correspond to the the values in <codeclass="literal">values</code>.</p><p><b><codeclass="literal">BaseList</code> Requirements.</b><codeclass="literal">BaseList</code> must model
correspond to the the values in <codeclass="literal">values</code>.</p><ptitle="BaseList Requirements"><b><codeclass="literal">BaseList</code> Requirements.</b><codeclass="literal">BaseList</code> must model
<ahref="../../../libs/utility/CopyConstructible.html"target="_top">CopyConstructible</a>. Depending on the element type,
it may also model <ahref="http://www.sgi.com/tech/stl/EqualityComparable.html"target="_top">EqualityComparable</a> and <ahref="http://www.sgi.com/tech/stl/LessThanComparable.html"target="_top">LessThanComparable</a>.
<aclass="ulink" href="../../../libs/utility/CopyConstructible.html"target="_top">CopyConstructible</a>. Depending on the element type,
it may also model <aclass="ulink" href="http://www.sgi.com/tech/stl/EqualityComparable.html"target="_top">EqualityComparable</a> and <aclass="ulink"href="http://www.sgi.com/tech/stl/LessThanComparable.html"target="_top">LessThanComparable</a>.
</span></dt><dd><p>This performs an element-wise copy of <codeclass="literal">x</code>
into the current <codeclass="literal">multi_array</code>.</p><p><b><codeclass="literal">Array</code> Requirements.</b><codeclass="literal">Array</code> must model MultiArray.
</p><p><b>Preconditions.</b>
into the current <codeclass="literal">multi_array</code>.</p><ptitle="Array Requirements"><b><codeclass="literal">Array</code> Requirements.</b><codeclass="literal">Array</code> must model MultiArray.
</span></dt><dd><p>This query returns the storage order object associated with the
<codeclass="literal">multi_array</code> in question. It can be used to construct a new array with the same storage order.</p></dd></dl></div></div><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="multi_array_ref"></a><codeclass="literal">multi_array_ref</code></h3></div></div></div><p>
<codeclass="literal">multi_array</code> in question. It can be used to construct a new array with the same storage order.</p></dd></dl></div></div><divclass="sect2"title="multi_array_ref"><divclass="titlepage"><div><div><h3class="title"><aname="multi_array_ref"></a><codeclass="literal">multi_array_ref</code></h3></div></div></div><p>
<codeclass="literal">multi_array_ref</code> is a multi-dimensional container
adaptor. It provides the MultiArray interface over any contiguous
block of elements. <codeclass="literal">multi_array_ref</code> exports the
same interface as <codeclass="literal">multi_array</code>, with the exception
and depending on the element type, it may also model
<ahref="http://www.sgi.com/tech/stl/EqualityComparable.html"target="_top">EqualityComparable</a> and <ahref="http://www.sgi.com/tech/stl/LessThanComparable.html"target="_top">LessThanComparable</a>.
<aclass="ulink" href="http://www.sgi.com/tech/stl/EqualityComparable.html"target="_top">EqualityComparable</a> and <aclass="ulink"href="http://www.sgi.com/tech/stl/LessThanComparable.html"target="_top">LessThanComparable</a>.
Detailed descriptions are provided here only for operations that are
not described in the <codeclass="literal">multi_array</code> reference.
</span></dt><dd><p>This performs an element-wise copy of <codeclass="literal">x</code>
into the current <codeclass="literal">multi_array_ref</code>.</p><p><b><codeclass="literal">Array</code> Requirements.</b><codeclass="literal">Array</code> must model MultiArray.
</p><p><b>Preconditions.</b>
into the current <codeclass="literal">multi_array_ref</code>.</p><ptitle="Array Requirements"><b><codeclass="literal">Array</code> Requirements.</b><codeclass="literal">Array</code> must model MultiArray.
and depending on the element type, it may also model
<ahref="http://www.sgi.com/tech/stl/EqualityComparable.html"target="_top">EqualityComparable</a> and <ahref="http://www.sgi.com/tech/stl/LessThanComparable.html"target="_top">LessThanComparable</a>.
<aclass="ulink" href="http://www.sgi.com/tech/stl/EqualityComparable.html"target="_top">EqualityComparable</a> and <aclass="ulink"href="http://www.sgi.com/tech/stl/LessThanComparable.html"target="_top">LessThanComparable</a>.
Detailed descriptions are provided here only for operations that are
not described in the <codeclass="literal">multi_array</code> reference.
@@ -1103,14 +1117,14 @@ With the exception of <code class="literal">extent_gen</code> and
same name required by MultiArray and are described in its
concept definition. <codeclass="literal">extent_gen</code> and
<codeclass="literal">extent_range</code> are described below.
</p></div><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="extent_range"></a><codeclass="classname">extent_range</code></h3></div></div></div><p><codeclass="classname">extent_range</code> objects define half open
</p></div><divclass="sect2"title="extent_range"><divclass="titlepage"><div><div><h3class="title"><aname="extent_range"></a><codeclass="classname">extent_range</code></h3></div></div></div><p><codeclass="classname">extent_range</code> objects define half open
intervals. They provide shape and index base information to
};</pre><p><b>Model Of.</b>DefaultConstructible,CopyConstructible</p><p><b>Methods and Types.</b></p><divclass="variablelist"><dl><dt><spanclass="term"><codeclass="function">extent_range(index start, index finish)</code></span></dt><dd><p> This constructor defines the half open interval
};</pre><ptitle="Model Of"><b>Model Of.</b>DefaultConstructible,CopyConstructible</p><ptitle="Methods and Types"><b>Methods and Types.</b></p><divclass="variablelist"><dl><dt><spanclass="term"><codeclass="function">extent_range(index start, index finish)</code></span></dt><dd><p> This constructor defines the half open interval
<codeclass="literal">[start,finish)</code>. The expression
<codeclass="literal">finish</code> must be greater than <codeclass="literal">start</code>.
</p></dd><dt><spanclass="term"><codeclass="function">extent_range(index finish)</code></span></dt><dd><p>This constructor defines the half open interval
<codeclass="literal">[0,finish)</code>. The value of <codeclass="literal">finish</code>
must be positive.</p></dd><dt><spanclass="term"><codeclass="function">index start()</code></span></dt><dd><p>This function returns the first index represented by the range</p></dd><dt><spanclass="term"><codeclass="function">index finish()</code></span></dt><dd><p>This function returns the upper boundary value of the half-open
interval. Note that the range does not include this value.</p></dd><dt><spanclass="term"><codeclass="function">size_type size()</code></span></dt><dd><p>This function returns the size of the specified range. It is
equivalent to <codeclass="literal">finish()-start()</code>.</p></dd></dl></div></div><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="extent_gen"></a><codeclass="classname">extent_gen</code></h3></div></div></div><p>The <codeclass="classname">extent_gen</code> class defines an
equivalent to <codeclass="literal">finish()-start()</code>.</p></dd></dl></div></div><divclass="sect2"title="extent_gen"><divclass="titlepage"><div><div><h3class="title"><aname="extent_gen"></a><codeclass="classname">extent_gen</code></h3></div></div></div><p>The <codeclass="classname">extent_gen</code> class defines an
interface for aggregating array shape and indexing information to be
passed to a <codeclass="literal">multi_array</code>,
<codeclass="literal">multi_array_ref</code>, or <codeclass="literal">const_multi_array_ref</code>
</pre><p><b>Methods and Types.</b></p><divclass="variablelist"><dl><dt><spanclass="term"><codeclass="function">template gen_type<Ranges>::type</code></span></dt><dd><p>This type generator is used to specify the result of
</pre><ptitle="Methods and Types"><b>Methods and Types.</b></p><divclass="variablelist"><dl><dt><spanclass="term"><codeclass="function">template gen_type<Ranges>::type</code></span></dt><dd><p>This type generator is used to specify the result of
<codeclass="literal">Ranges</code> chained calls to
<codeclass="literal">extent_gen::operator[].</code> The types
<codeclass="classname">extent_gen</code> and
@@ -1172,7 +1186,7 @@ operator[](index idx) const;</code></span></dt><dd><p>This function returns a ne
<codeclass="classname">extent_range</code> objects in addition to
<codeclass="literal">extent_range(0,idx).</code> This function gives the array
constructors a similar syntax to traditional C multidimensional array
declaration.</p></dd></dl></div></div><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="id862830"></a>Global Objects</h3></div></div></div><p>For syntactic convenience, Boost.MultiArray defines two
declaration.</p></dd></dl></div></div><divclass="sect2"title="Global Objects"><divclass="titlepage"><div><div><h3class="title"><aname="idp19487120"></a>Global Objects</h3></div></div></div><p>For syntactic convenience, Boost.MultiArray defines two
global objects as part of its
interface. These objects play the role of object generators;
expressions involving them create other objects of interest.
@@ -1180,7 +1194,7 @@ expressions involving them create other objects of interest.
considered excessive overhead. Their construction can be prevented by
defining the preprocessor symbol
<codeclass="literal">BOOST_MULTI_ARRAY_NO_GENERATORS</code> before including
</p></div></div><divclass="sect2"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="generators"></a>View and SubArray Generators</h3></div></div></div><p>
</p></div></div><divclass="sect2"title="View and SubArray Generators"><divclass="titlepage"><div><div><h3class="title"><aname="generators"></a>View and SubArray Generators</h3></div></div></div><p>
array should store its elements using the same layout as that used by
primitive C++ multidimensional arrays, that is, from last dimension
to first. This is the default storage order for the arrays provided by
this library.</p></div><divclass="sect3"lang="en"><divclass="titlepage"><div><div><h4class="title"><aname="fortran_storage_order"></a><codeclass="literal">fortran_storage_order</code></h4></div></div></div><preclass="programlisting">
this library.</p></div><divclass="sect3"title="fortran_storage_order"><divclass="titlepage"><div><div><h4class="title"><aname="fortran_storage_order"></a><codeclass="literal">fortran_storage_order</code></h4></div></div></div><preclass="programlisting">
class fortran_storage_order {
fortran_storage_order();
};
</pre><p><codeclass="literal">fortran_storage_order</code> is used to specify that
an array should store its elements using the same memory layout as a
Fortran multidimensional array would, that is, from first dimension to
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.