summaryrefslogtreecommitdiff
path: root/doc/html/multi_array.html
blob: 68ffb42e73bf1ae917dc6799dfd1b723248ec274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chapter&#160;26.&#160;Boost.MultiArray Reference Manual</title>
<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="libraries.html" title="Part&#160;I.&#160;The Boost C++ Libraries (BoostBook Subset)">
<link rel="prev" href="mpi/python.html" title="Python Bindings">
<link rel="next" href="MultiArray.html" title="MultiArray Concept">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td>
<td align="center"><a href="../../index.html">Home</a></td>
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="mpi/python.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="MultiArray.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="chapter">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="multi_array"></a>Chapter&#160;26.&#160;Boost.MultiArray Reference Manual</h2></div>
<div><div class="author">
<h3 class="author">
<span class="firstname">Ronald</span> <span class="surname">Garcia</span>
</h3>
<div class="affiliation">
<span class="orgname">Indiana University<br></span> <span class="orgdiv">Open Systems Lab<br></span>
</div>
</div></div>
<div><p class="copyright">Copyright &#169; 2002 The Trustees of Indiana University</p></div>
</div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc">
<dt><span class="sect1"><a href="multi_array.html#synopsis">Library Synopsis</a></span></dt>
<dt><span class="sect1"><a href="MultiArray.html">MultiArray Concept</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="MultiArray.html#idp418833152">Notation</a></span></dt>
<dt><span class="sect2"><a href="MultiArray.html#idp418853040">Associated Types</a></span></dt>
<dt><span class="sect2"><a href="MultiArray.html#idp418913728">Valid expressions</a></span></dt>
<dt><span class="sect2"><a href="MultiArray.html#idp419009440">Complexity guarantees</a></span></dt>
<dt><span class="sect2"><a href="MultiArray.html#idp419012336">Invariants</a></span></dt>
<dt><span class="sect2"><a href="MultiArray.html#view_types">Associated Types for Views</a></span></dt>
<dt><span class="sect2"><a href="MultiArray.html#idp419175168">Models</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="array_types.html">Array Components</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="array_types.html#multi_array_class"><code class="literal">multi_array</code></a></span></dt>
<dt><span class="sect2"><a href="array_types.html#multi_array_ref"><code class="literal">multi_array_ref</code></a></span></dt>
<dt><span class="sect2"><a href="array_types.html#const_multi_array_ref"><code class="literal">const_multi_array_ref</code></a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="auxiliary.html">Auxiliary Components</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="auxiliary.html#multi_array_types"><code class="literal">multi_array_types</code></a></span></dt>
<dt><span class="sect2"><a href="auxiliary.html#extent_range"><code class="computeroutput">extent_range</code></a></span></dt>
<dt><span class="sect2"><a href="auxiliary.html#extent_gen"><code class="computeroutput">extent_gen</code></a></span></dt>
<dt><span class="sect2"><a href="auxiliary.html#idp419476784">Global Objects</a></span></dt>
<dt><span class="sect2"><a href="auxiliary.html#generators">View and SubArray Generators</a></span></dt>
<dt><span class="sect2"><a href="auxiliary.html#memory_layout">Memory Layout Specifiers</a></span></dt>
<dt><span class="sect2"><a href="auxiliary.html#range_checking">Range Checking</a></span></dt>
</dl></dd>
</dl>
</div>
<p>Boost.MultiArray is composed of several components.
The MultiArray concept defines a generic interface to multidimensional
containers.
<code class="literal">multi_array</code> is a general purpose container class
that models MultiArray. <code class="literal">multi_array_ref</code>
and <code class="literal">const_multi_array_ref</code> are adapter
classes. Using them, 
you can manipulate any block of contiguous data as though it were a
<code class="literal">multi_array</code>.
<code class="literal">const_multi_array_ref</code> differs from
<code class="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>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="synopsis"></a>Library Synopsis</h2></div></div></div>
<p>To use Boost.MultiArray, you must include the header 
<code class="filename">boost/multi_array.hpp</code> in your source. This file
brings the following declarations into scope:</p>
<pre class="programlisting">
namespace boost {
  
  namespace multi_array_types {
    typedef *unspecified* index;
    typedef *unspecified* size_type;
    typedef *unspecified* difference_type;
    typedef *unspecified* index_range;
    typedef *unspecified* extent_range;
    typedef *unspecified* index_gen;
    typedef *unspecified* extent_gen;
  }

  template &lt;typename ValueType, 
            std::size_t NumDims, 
            typename Allocator = std::allocator&lt;ValueType&gt; &gt;
  class multi_array;

  template &lt;typename ValueType, 
            std::size_t NumDims&gt;
  class multi_array_ref;

  template &lt;typename ValueType, 
            std::size_t NumDims&gt; 
  class const_multi_array_ref;

  multi_array_types::extent_gen extents;
  multi_array_types::index_gen  indices;

  template &lt;typename Array, int N&gt; class subarray_gen;
  template &lt;typename Array, int N&gt; class const_subarray_gen;
  template &lt;typename Array, int N&gt; class array_view_gen;
  template &lt;typename Array, int N&gt; class const_array_view_gen;

  class c_storage_order; 
  class fortran_storage_order;
  template &lt;std::size_t NumDims&gt; class general_storage_order;

}
</pre>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="mpi/python.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="MultiArray.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>