diff --git a/doc/reference.html b/doc/reference.html index c302185..adf7798 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -1,4 +1,4 @@ -Boost.MultiArray Reference Manual

Boost.MultiArray Reference Manual

Ronald Garcia

Indiana University
Open Systems Lab

Table of Contents

Library Synopsis
MultiArray Concept
Notation
Associated Types
Valid expressions
Complexity guarantees
Invariants
Associated Types for Views
Models
Array Components
multi_array
multi_array_ref
const_multi_array_ref
Auxiliary Components
multi_array_types
extent_range
extent_gen
Global Objects
View and SubArray Generators
Memory Layout Specifiers

Boost.MultiArray is composed of several components. +Boost.MultiArray Reference Manual

Boost.MultiArray Reference Manual

Ronald Garcia

Indiana University
Open Systems Lab

Boost.MultiArray is composed of several components. The MultiArray concept defines a generic interface to multidimensional containers. multi_array is a general purpose container class @@ -121,7 +121,7 @@ occurs when a single-index is specified to

has a degenerate second dimension. The view generated from the above -specification will have 2 dimensions with shape 5 x 2. +specification will have 2 dimensions with shape 5 x 4. If the "2" above were replaced with another index_range object, for example: @@ -150,16 +150,16 @@ 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). -

Notation

What follows are the descriptions of symbols that will be used -to describe the MultiArray interface.

Table 1. Notation

AA type that is a model of MultiArray +

Notation

What follows are the descriptions of symbols that will be used +to describe the MultiArray interface.

Table 1. Notation

AA type that is a model of MultiArray
aAn object of type A
NumDimsThe numeric dimension parameter associated with A.
DimsSome numeric dimension parameter such that 0<Dims<NumDims.
indicesAn object created by some number of chained calls to index_gen::operator[](index_range).
index_listAn object whose type models Collection
idxA signed integral value.
tmpAn object of type - boost::array<index,NumDims>

Associated Types

-

Table 2. Associated Types

TypeDescription
value_typeThis is the value type of the container. + boost::array<index,NumDims>

Associated Types

+

Table 2. Associated Types

TypeDescription
value_typeThis is the value type of the container. If NumDims == 1, then this is element. Otherwise, this is the value type of the immediately nested containers. @@ -228,7 +228,7 @@ It models MultiArray.
template const_array_view<Dims>::type This is the const view type with Dims dimensions. -

Valid expressions

Table 3. Valid Expressions

ExpressionReturn typeSemantics
a.shape()const size_type* +

Valid expressions

Table 3. Valid Expressions

ExpressionReturn typeSemantics
a.shape()const size_type* This returns a list of NumDims elements specifying the extent of each array dimension.
a.strides()const index* @@ -315,11 +315,11 @@ type must model
a >= bboolThis performs a lexicographical comparison of the values of a and b. The element type must model LessThanComparable for this -expression to be valid.

Complexity guarantees

begin() and end() execute in amortized +expression to be valid.

Complexity guarantees

begin() and end() execute in amortized constant time. size() executes in at most linear time in the MultiArray's size. -

Invariants

Table 4. Invariants

Valid range[a.begin(),a.end()) is a valid range. +

Invariants

Table 4. Invariants

Valid range[a.begin(),a.end()) is a valid range.
Range sizea.size() == std::distance(a.begin(),a.end());.
Completeness Iteration through the range @@ -357,10 +357,10 @@ operators, a half open range [5,10) can be specified as follows: The following describes the index_range interface. -

Table 5. Notation

iAn object of type index_range.
idx,idx1,idx2,idx3Objects of type index.

Table 6. Associated Types

TypeDescription
indexThis is a signed integral type. It is used to +

Table 5. Notation

iAn object of type index_range.
idx,idx1,idx2,idx3Objects of type index.

Table 6. Associated Types

TypeDescription
indexThis is a signed integral type. It is used to specify the start, finish, and stride values.
size_typeThis is an unsigned integral type. It is used to report the size of the range an index_range -represents.

Table 7. Valid Expressions

ExpressionReturn typeSemantics
index_range(idx1,idx2,idx3)index_rangeThis constructs an index_range +represents.

Table 7. Valid Expressions

ExpressionReturn typeSemantics
index_range(idx1,idx2,idx3)index_rangeThis constructs an index_range representing the interval [idx1,idx2) with stride idx3.
index_range(idx1,idx2)index_rangeThis constructs an index_range representing the interval [idx1,idx2) @@ -397,9 +397,9 @@ of i up by idx. It is equivale parameters. Chained calls to operator[] store range and dimension information used to instantiate a new view into a MultiArray. -

Table 8. Notation

Dims,RangesUnsigned integral values.
xAn object of type +

Table 8. Notation

Dims,RangesUnsigned integral values.
xAn object of type template gen_type<Dims,Ranges>::type.
iAn object of type -index_range.
idxObjects of type index.

Table 9. Associated Types

TypeDescription
indexThis is a signed integral type. It is used to +index_range.
idxObjects of type index.

Table 9. Associated Types

TypeDescription
indexThis is a signed integral type. It is used to specify degenerate dimensions.
size_typeThis is an unsigned integral type. It is used to report the size of the range an index_range represents.
template gen_type::<Dims,Ranges>::typeThis type generator names the result of @@ -409,7 +409,7 @@ represents.
template gen_type::<Dims,Ran degenerate ranges specified (i.e. calls to operator[](index)). Note that index_gen and -gen_type<0,0>::type are the same type.

Table 10. Valid Expressions

ExpressionReturn typeSemantics
index_gen()gen_type<0,0>::typeThis constructs an index_gen +gen_type<0,0>::type are the same type.

Table 10. Valid Expressions

ExpressionReturn typeSemantics
index_gen()gen_type<0,0>::typeThis constructs an index_gen object. This object can then be used to generate tuples of index_range values.
x[i]gen_type<Dims+1,Ranges+1>::typeReturns a new object containing all previous index_range objects in addition to @@ -421,7 +421,7 @@ range, index_range(idx,idx). Note that this is NOT equivalent to x[index_range(idx,idx)]., which will return an object of type gen_type<Dims+1,Ranges+1>::type. -

Models

  • multi_array
  • multi_array_ref
  • const_multi_array_ref
  • template array_view<Dims>::type
  • template const_array_view<Dims>::type
  • template subarray<Dims>::type
  • template const_subarray<Dims>::type

Array Components

+

Models

  • multi_array
  • multi_array_ref
  • const_multi_array_ref
  • template array_view<Dims>::type
  • template const_array_view<Dims>::type
  • template subarray<Dims>::type
  • template const_subarray<Dims>::type

Array Components

Boost.MultiArray defines an array class, multi_array, and two adapter classes, multi_array_ref and @@ -1117,7 +1117,7 @@ operator[](index idx) const;

This function returns a new extent_range objects in addition to extent_range(0,idx). This function gives the array constructors a similar syntax to traditional C multidimensional array -declaration.

Global Objects

For syntactic convenience, Boost.MultiArray defines two +declaration.

Global Objects

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.