Array< D, T > Class Template Reference
[Data]

multi dimensional arrays More...

#include <array.h>

Inherits DataClass.

Collaboration diagram for Array< D, T >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef T value
typedef Array< 1, T > vector
typedef Array< 2, T > matrix
typedef ArrayIterator< D, T,
false, 0, false > 
values
typedef ArrayIterator< D, T,
false, 0, true > 
ordered
typedef ArrayIterator< D, T,
true,0, false > 
positions
typedef ArrayIterator< D, T,
false, 1, false > 
vector_values
typedef ArrayIterator< D, T,
true,1, false > 
vector_positions
typedef ArrayIterator< D, T,
true,1, true > 
ordered_vectors
typedef ArrayIterator< D, T,
false, 2, false > 
matrix_values
typedef ArrayIterator< D, T,
true,2, false > 
matrix_positions

Public Member Functions

 Array ()
 Array (Size< D > size)
 Array (int x)
 Array (int x, int y)
 Array (int x, int y, int z)
 Array (int x, int y, int z, int a)
 Array (int x, int y, int z, int a, int b, int c)
 Array (const Array< D, T > &m)
 Array (SpecialStorage< T > *store, Size< D > sizes)
template<int O>
 Array (const Array< O, T > &m)
template<int O>
 Array (const Array< O, T > &other, const Select< D > &selected)
Array< D, T > & operator= (const Array< D, T > &m)
Array< D, T > & operator= (const T &m)
Array< D, T > & operator+= (const T &m)
Array< D, T > & operator+= (const Array< D, T > &m)
Array< D, T > & operator-= (const T &m)
Array< D, T > & operator/= (const T &m)
Array< D, T > & operator*= (const T &m)
Array< D, T > operator* (const T m) const
Array< D, T > operator/ (const T m) const
Array< D, T > operator+ (const Array< D, T > &m) const
 ~Array ()
Array< D, T > operator() (const From< D > &from) const
Array< D, T > operator() (const To< D > &to) const
Array< D, T > operator() (const Size< D > &s) const
Array< D, T > operator() (const From< D > &from, const To< D > &to) const
Array< D, T > operator() (const From< D > &from, const Size< D > &size) const
template<int O>
Array< O, T > operator() (const Select< O > keep) const
void setAddress (T *start)
int size (int i) const
Size< D > size () const
bool empty () const
Delta< D > delta () const
int delta (int i) const
T * address (Position< D > i) const
T & operator[] (Position< D > i) const
bool operator== (const Array< D, T > &m) const
bool operator!= (const Array< D, T > &m) const
void printMetaInfo () const
template<class F >
void copyFrom (const Array< D, F > &source)
void copyFrom (const Array< D, T > &source, const From< D > &where)
virtual Data getField (QString e)

Public Attributes

ArrayMeta< D, T > * content

Protected Member Functions

virtual QString type_name () const
virtual DataClassshallow_copy () const
virtual void visit (DataVisitor &v)
 Array (ArrayMeta< D, T > *content_with_correct_refcount)


Detailed Description

template<int D, class T>
class Array< D, T >

multi dimensional arrays

Multidimensional arrays were conceived for a number of reasons. In various software we needed some way to handle large volumes of data while providing different views on the data. Currently, giving the considerations of a read-only memory this library would probably be redefined completely. Nevertheless at that time, my main interest was the multidimensional operations that were possible and a way to store retrieve them in a platform transparent manner. Some of the uses:

BpmDj

Gel Analysis

Petri-nets

The problem of cross platform access to data has not yet vanished, as such most of these data expression are still useful to read data from files and save it if we write our own flow modules.

Definition at line 84 of file array.h.


Member Typedef Documentation

template<int D, class T>
typedef Array<2,T> Array< D, T >::matrix

Definition at line 277 of file array.h.

template<int D, class T>
typedef ArrayIterator<D,T,true ,2,false> Array< D, T >::matrix_positions

Definition at line 286 of file array.h.

template<int D, class T>
typedef ArrayIterator<D,T,false,2,false> Array< D, T >::matrix_values

Definition at line 285 of file array.h.

template<int D, class T>
typedef ArrayIterator<D,T,false,0,true> Array< D, T >::ordered

Definition at line 280 of file array.h.

template<int D, class T>
typedef ArrayIterator<D,T,true ,1,true> Array< D, T >::ordered_vectors

Definition at line 284 of file array.h.

template<int D, class T>
typedef ArrayIterator<D,T,true ,0,false> Array< D, T >::positions

Definition at line 281 of file array.h.

template<int D, class T>
typedef T Array< D, T >::value

Definition at line 275 of file array.h.

template<int D, class T>
typedef ArrayIterator<D,T,false,0,false> Array< D, T >::values

Definition at line 279 of file array.h.

template<int D, class T>
typedef Array<1,T> Array< D, T >::vector

Definition at line 276 of file array.h.

template<int D, class T>
typedef ArrayIterator<D,T,true ,1,false> Array< D, T >::vector_positions

Definition at line 283 of file array.h.

template<int D, class T>
typedef ArrayIterator<D,T,false,1,false> Array< D, T >::vector_values

Definition at line 282 of file array.h.


Constructor & Destructor Documentation

template<int D, class T>
Array< D, T >::Array ( ArrayMeta< D, T > *  content_with_correct_refcount  )  [inline, protected]

Definition at line 104 of file array.h.

template<int D, class T>
Array< D, T >::Array (  )  [inline]

Definition at line 121 of file array.h.

template<int D, class T>
Array< D, T >::Array ( Size< D >  size  )  [inline]

Definition at line 126 of file array.h.

template<int D, class T>
Array< D, T >::Array ( int  x  )  [inline]

Definition at line 130 of file array.h.

template<int D, class T>
Array< D, T >::Array ( int  x,
int  y 
) [inline]

Definition at line 134 of file array.h.

template<int D, class T>
Array< D, T >::Array ( int  x,
int  y,
int  z 
) [inline]

Definition at line 138 of file array.h.

template<int D, class T>
Array< D, T >::Array ( int  x,
int  y,
int  z,
int  a 
) [inline]

Definition at line 142 of file array.h.

template<int D, class T>
Array< D, T >::Array ( int  x,
int  y,
int  z,
int  a,
int  b,
int  c 
) [inline]

Definition at line 146 of file array.h.

template<int D, class T>
Array< D, T >::Array ( const Array< D, T > &  m  )  [inline]

Definition at line 150 of file array.h.

template<int D, class T>
Array< D, T >::Array ( SpecialStorage< T > *  store,
Size< D >  sizes 
) [inline]

This constructor accepts a SpecialStorage type (see array-storage). It will increase the reference counter immediately with one, effectively taking ownership of the data since it will also delete the data when the counter reaches zero.

Definition at line 162 of file array.h.

template<int D, class T>
template<int O>
Array< D, T >::Array ( const Array< O, T > &  m  )  [inline]

this constructor will refer to the same data but assume the array has a different dimensionality remaining dimensions will be padded with size 1. O must be smaller than T;

Definition at line 467 of file array.h.

template<int D, class T>
template<int O>
Array< D, T >::Array ( const Array< O, T > &  other,
const Select< D > &  selected 
) [inline]

this constructor can be used when O is larger than T. In that case only the selected dimensions will remain.

Definition at line 460 of file array.h.

template<int D, class T>
Array< D, T >::~Array (  )  [inline]

Definition at line 190 of file array.h.


Member Function Documentation

template<int D, class T>
T* Array< D, T >::address ( Position< D >  i  )  const [inline]

Definition at line 245 of file array.h.

Here is the caller graph for this function:

template<int D, class T>
void Array< D, T >::copyFrom ( const Array< D, T > &  source,
const From< D > &  where 
) [inline]

Will set an area of this area to the array given in o. No boundary warnings are given, but no ill result should happen either. In other words, the copy area will be limited to the size of the possible target area.

Definition at line 383 of file array.h.

Here is the call graph for this function:

template<int D, class T >
template<class F >
void Array< D, T >::copyFrom ( const Array< D, F > &  source  )  [inline]

will copy the data in source to target using the assignment operator Both sizes must be equal and valid

Definition at line 398 of file array.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<int D, class T>
int Array< D, T >::delta ( int  i  )  const [inline]

Definition at line 241 of file array.h.

template<int D, class T>
Delta<D> Array< D, T >::delta (  )  const [inline]

Definition at line 237 of file array.h.

template<int D, class T>
bool Array< D, T >::empty (  )  const [inline]

Definition at line 233 of file array.h.

template<int D, class T >
Data Array< D, T >::getField ( QString  ref  )  [inline, virtual]

setting and getting of subtrees and values

Reimplemented from DataClass.

Definition at line 301 of file array.h.

Here is the call graph for this function:

template<int D, class T>
bool Array< D, T >::operator!= ( const Array< D, T > &  m  )  const [inline]

Definition at line 254 of file array.h.

template<int D, class T>
template<int O>
Array<O,T> Array< D, T >::operator() ( const Select< O >  keep  )  const [inline]

Definition at line 216 of file array.h.

template<int D, class T>
Array<D,T> Array< D, T >::operator() ( const From< D > &  from,
const Size< D > &  size 
) const [inline]

Definition at line 212 of file array.h.

template<int D, class T>
Array<D,T> Array< D, T >::operator() ( const From< D > &  from,
const To< D > &  to 
) const [inline]

Definition at line 208 of file array.h.

template<int D, class T>
Array<D,T> Array< D, T >::operator() ( const Size< D > &  s  )  const [inline]

Definition at line 204 of file array.h.

template<int D, class T>
Array<D,T> Array< D, T >::operator() ( const To< D > &  to  )  const [inline]

Definition at line 200 of file array.h.

template<int D, class T>
Array<D,T> Array< D, T >::operator() ( const From< D > &  from  )  const [inline]

Definition at line 196 of file array.h.

template<int D, class T>
Array< D, T > Array< D, T >::operator* ( const T  m  )  const [inline]

Definition at line 488 of file array.h.

Here is the call graph for this function:

template<int D, class T>
Array< D, T > & Array< D, T >::operator*= ( const T &  m  )  [inline]

Definition at line 441 of file array.h.

template<int D, class T>
Array< D, T > Array< D, T >::operator+ ( const Array< D, T > &  m  )  const [inline]

Definition at line 506 of file array.h.

Here is the call graph for this function:

template<int D, class T>
Array< D, T > & Array< D, T >::operator+= ( const Array< D, T > &  m  )  [inline]

Definition at line 420 of file array.h.

template<int D, class T>
Array< D, T > & Array< D, T >::operator+= ( const T &  m  )  [inline]

Definition at line 412 of file array.h.

template<int D, class T>
Array< D, T > & Array< D, T >::operator-= ( const T &  m  )  [inline]

Definition at line 427 of file array.h.

template<int D, class T>
Array< D, T > Array< D, T >::operator/ ( const T  m  )  const [inline]

Definition at line 497 of file array.h.

Here is the call graph for this function:

template<int D, class T>
Array< D, T > & Array< D, T >::operator/= ( const T &  m  )  [inline]

Definition at line 434 of file array.h.

template<int D, class T>
Array< D, T > & Array< D, T >::operator= ( const T &  m  )  [inline]

The assignment operator will set the content of the array to the given value using the = operator. This function is optimized in cases the array can be treated in linear blocks.

Definition at line 356 of file array.h.

Here is the call graph for this function:

template<int D, class T>
Array< D, T > & Array< D, T >::operator= ( const Array< D, T > &  m  )  [inline]

Definition at line 473 of file array.h.

template<int D, class T>
bool Array< D, T >::operator== ( const Array< D, T > &  m  )  const [inline]

Definition at line 449 of file array.h.

template<int D, class T>
T& Array< D, T >::operator[] ( Position< D >  i  )  const [inline]

Definition at line 249 of file array.h.

template<int D, class T >
void Array< D, T >::printMetaInfo (  )  const [inline]

Definition at line 482 of file array.h.

template<int D, class T>
void Array< D, T >::setAddress ( T *  start  )  [inline]

Definition at line 221 of file array.h.

template<int D, class T>
virtual DataClass* Array< D, T >::shallow_copy (  )  const [inline, protected, virtual]

The shallow_copy function should be overridden to return a shallow copy of the own object, but allocated with new.

Implements DataClass.

Definition at line 96 of file array.h.

template<int D, class T>
Size<D> Array< D, T >::size (  )  const [inline]

Definition at line 229 of file array.h.

Here is the caller graph for this function:

template<int D, class T>
int Array< D, T >::size ( int  i  )  const [inline]

Definition at line 225 of file array.h.

Here is the caller graph for this function:

template<int D, class T>
virtual QString Array< D, T >::type_name (  )  const [inline, protected, virtual]

Implements DataClass.

Definition at line 88 of file array.h.

Here is the caller graph for this function:

template<int D, class T>
virtual void Array< D, T >::visit ( DataVisitor v  )  [inline, protected, virtual]

Implements DataClass.

Definition at line 100 of file array.h.


Member Data Documentation

template<int D, class T>
ArrayMeta<D,T>* Array< D, T >::content

Definition at line 119 of file array.h.


The documentation for this class was generated from the following file:

Generated on Sat Feb 20 19:04:26 2010 for Data Objects by  doxygen 1.5.9