Public Types | Public Member Functions

MultiArrayBase< N, T > Class Template Reference
[Multidimensional Arrays with Flexible Data Layout and On-Demand Slice Creation]

A generic multidimensional array is a one-dimensional pointer together with a specification of the extent in some dimensions. More...

#include <MultiArray.hpp>

List of all members.

Public Types

Public Member Functions


Detailed Description

template<int N, class T>
class MultiArrayBase< N, T >

A generic multidimensional array is a one-dimensional pointer together with a specification of the extent in some dimensions.

Data are stored in a one-dimensional container and accessed via a multidimensional index.

Note:
MultiArray's are lightweight, i.e. they can be copied easily and even be returned by a function. They consist of an Iterator plus one integer for each dimension.

Member Function Documentation

template<int N, class T>
reference_t MultiArrayBase< N, T >::operator[] ( const MultiIndex< N > &  I  )  const [inline]

Element access.

Todo:
Creation of elements not tested!
template<int N, class T>
Slice_t MultiArrayBase< N, T >::slice ( index_t  i  )  const [inline]

Extract an N-1 dimensional slice of the current data set for read-only access.

The returned objects contain a pointer to the original data (which are shared with the hyperslab) and N-1 indices referring to the respective dimensions. Note that the hyperslab data reside contigously in memory.

Examples:
CreatorExample.cpp.