AFF --- A container for numbers (array) by Friederich and Forbriger.
|
Full multi-dimensional array functionality.This is the full array class template. It adds no additional functionality to its base class aff::ConstArray. But it provied acess to all member functions of the base, also to functions that allow data modification. More...
#include <array.h>
Public Types | |
Various types | |
In particular due to our concept of const-correctness we need several typedefs to declare types derived from the element type of the array. | |
typedef Array< T > | Tcontainer |
Type of this array. More... | |
typedef aff::ConstArray< T > | Tbase |
base is container of const (see specialization below) More... | |
typedef Tbase | Tcontainer_of_const |
Type of the array of const values. More... | |
typedef Tbase | Tcoc |
short for Tcontainer_of_const More... | |
typedef aff::SharedHeap< T > | Trepresentation |
Type of representation. More... | |
typedef aff::Strided | Tshape |
Type of subscriptor. More... | |
typedef Tshape::TIndexVec | TIndexVec |
we use this for one of the access operators More... | |
typedef T | Tvalue |
Element type. More... | |
typedef T * | Tpointer |
Type of pointer to element. More... | |
typedef T & | Treference |
Type of reference to element. More... | |
typedef const T | Tconst_value |
const element type More... | |
typedef const T * | Tconst_pointer |
Type of pointer to const element. More... | |
typedef const T & | Tconst_reference |
Type of reference to const element. More... | |
Various types | |
In particular due to our concept of const-correctness we need several typedefs to declare types derived from the element type of the array. This is in particular usefull for function templates that may take any container class as argument (e.g. aff::subarray) or for other classes dealing with any container (e.g. aff::Iterator). By means of these typedefs they may retrieve appropriate types they have to deal with. | |
typedef Tshape::Tstepper | Tstepper |
Type of shape stepper. More... | |
Public Member Functions | |
template<class C > | |
Array & | copyin (const C &a) |
copy values (deep copy) from other array of convertible type More... | |
const Trepresentation & | representation () const |
return full access representation More... | |
Tcontainer & | operator= (const T &value) |
set whole array to value More... | |
T & | operator() (const TIndexVec &index) const |
full dimensionality access More... | |
T & | operator() (const Tsubscript &i0) const |
access from 1 index value More... | |
T & | operator() (const Tsubscript &i0, const Tsubscript &i1) const |
access from 2 index values More... | |
T & | operator() (const Tsubscript &i0, const Tsubscript &i1, const Tsubscript &i2) const |
access from 3 index values More... | |
T & | operator() (const Tsubscript &i0, const Tsubscript &i1, const Tsubscript &i2, const Tsubscript &i3) const |
access from 4 index values More... | |
Array< T > | copyout () const |
create an identical copy (deep copy) of this array More... | |
const Tshape & | shape () const |
provide access to const shape More... | |
Tshape & | shape () |
allow shape manipulation More... | |
Constructors | |
| |
Array () | |
construct from nothing (empty) More... | |
Array (const Tshape &shape, const Trepresentation &representation) | |
construct from shape and representation More... | |
Array (const Tshape &shape) | |
construct from shape (defines size and layout) More... | |
Array (const Tsize &s0, const Tsize &s1=1, const Tsize &s2=1, const Tsize &s3=1) | |
construct from dimension sizes More... | |
access declarations | |
const Tshape & | shape () const |
provide access to const shape More... | |
Tshape & | shape () |
allow shape manipulation More... | |
Array< T > | copyout () const |
create an identical copy (deep copy) of this array More... | |
Shape access | |
const Tsubscript & | f (const Tsubscript &i) const |
return first index of dimension i More... | |
const Tsubscript & | l (const Tsubscript &i) const |
return last index of dimension i More... | |
access declarations | |
const Tsubscript & | first (const Tsubscript &i) const |
access to base class function More... | |
const TIndexVec & | first () const |
access to base class function More... | |
const Tsubscript & | last (const Tsubscript &i) const |
last index of dimension More... | |
const TIndexVec & | last () const |
return vector of last index values More... | |
Tsize | size () const |
total number of mapped elements More... | |
Tsize | size (const Tsubscript &i) const |
size of dimension More... | |
Protected Member Functions | |
Tsubscript | offset (const TIndexVec &index) const |
provide access to shape offset functions for derived class More... | |
Tsubscript | offset (const Tsubscript &i0) const |
provide access to shape offset functions for derived class More... | |
Tsubscript | offset (const Tsubscript &i0, const Tsubscript &i1) const |
provide access to shape offset functions for derived class More... | |
Tsubscript | offset (const Tsubscript &i0, const Tsubscript &i1, const Tsubscript &i2) const |
provide access to shape offset functions for derived class More... | |
Tsubscript | offset (const Tsubscript &i0, const Tsubscript &i1, const Tsubscript &i2, const Tsubscript &i3) const |
provide access to shape offset functions for derived class More... | |
Private Attributes | |
Trepresentation | Mrepresentation |
my (mutable) data representation More... | |
Full multi-dimensional array functionality.
This is the full array class template. It adds no additional functionality to its base class aff::ConstArray. But it provied acess to all member functions of the base, also to functions that allow data modification.