CIMPL::Array< T > Class Template Reference

Multi-dimensional Array class. More...

#include <Array.h>

List of all members.

Public Member Functions

 Array ()
 Array (const int)
 Array (const int, const int)
 Array (const int, const int, const int)
 Array (const int, const int, const int, const int,...)
 Array (const int _ndims, const int *_dims)
 Array (Array< T > &m)
 ~Array ()
const T * DataPtr ()
T * Data ()
Array< T > Clone () const
const int XDim () const
const int YDim () const
const int ZDim () const
const int * Dims () const
const int * Size () const
int Length () const
int NDims () const
void Init (const T init)
Array< T > & Add (Array< T > &m)
Array< T > & Subtract (Array< T > &m)
Array< T > & Multiply (Array< T > &m)
Array< T > & Divide (Array< T > &m)
Array< T > & Add (T v)
Array< T > & Subtract (T v)
Array< T > & Multiply (T v)
Array< T > & Divide (T v)
Array< T > & operator= (Array< T > &m)
Array< T > & operator= (Matrix< T > &m)
Array< T > & operator= (Vector< T > &m)
Array< T > operator+ ()
Array< T > operator- ()
Array< int > operator! ()
T & operator() (const int i)
T & operator[] (const int i)
T & operator() (const int i, const int j,...)
T & Elem (const int i, const int j,...)
 Array element access (dim1, dim2, dim3, ...). Bounds are checked.
T & ElemNC (const int i, const int j,...)
 Array element access (row,col). Bounds are not checked.
T & Elem (const int i)
 Array element access (sequential: column scan). Bounds are checked.
T & ElemNC (const int i)
 Array element access (sequential: column scan). Bounds are not checked.
Array< T > & operator+= (Array< T > &m)
Array< T > & operator-= (Array< T > &m)
Array< T > & operator *= (Array< T > &m)
Array< T > & operator/= (Array< T > &m)
Array< T > & operator+= (T v)
Array< T > & operator-= (T v)
Array< T > & operator *= (T v)
Array< T > & operator/= (T v)
 Array (Matrix< T > &m)
 Array (Vector< T > &m)

Static Public Member Functions

bool IsCompatible (Array< T > &m1, Array< T > &m2)
Array< int > And (Array< T > &m1, Array< T > &m2)
Array< int > Or (Array< T > &m1, Array< T > &m2)
Array< int > Lt (Array< T > &m1, Array< T > &m2)
Array< int > Gt (Array< T > &m1, Array< T > &m2)
Array< int > Le (Array< T > &m1, Array< T > &m2)
Array< int > Ge (Array< T > &m1, Array< T > &m2)
Array< int > Eq (Array< T > &m1, Array< T > &m2)
Array< int > Ne (Array< T > &m1, Array< T > &m2)
Array< int > And (Array< T > &m, T v)
Array< int > Or (Array< T > &m, T v)
Array< int > Lt (Array< T > &m, T v)
Array< int > Gt (Array< T > &m, T v)
Array< int > Le (Array< T > &m, T v)
Array< int > Ge (Array< T > &m, T v)
Array< int > Eq (Array< T > &m, T v)
Array< int > Ne (Array< T > &m, T v)
Array< T > Add (Array< T > &m1, Array< T > &m2)
Array< T > Subtract (Array< T > &m1, Array< T > &m2)
Array< T > Multiply (Array< T > &m1, Array< T > &m2)
Array< T > Divide (Array< T > &m1, Array< T > &m2)
Array< T > Add (Array< T > &m1, T v2)
Array< T > Subtract (Array< T > &m1, T v2)
Array< T > Subtract (T v2, Array< T > &m1)
Array< T > Multiply (Array< T > &m1, T v2)
Array< T > Divide (Array< T > &m1, T v2)
Array< T > Divide (T v2, Array< T > &m1)

Protected Attributes

T * data
int ndims
int length
int * dims
Cleaner< T > * clean

Friends

class Matrix<T>
class Vector<T>
Array< int > operator && (Array< T > &m1, Array< T > &m2)
Array< int > operator|| (Array< T > &m1, Array< T > &m2)
Array< int > operator< (Array< T > &m1, Array< T > &m2)
Array< int > operator> (Array< T > &m1, Array< T > &m2)
Array< int > operator<= (Array< T > &m1, Array< T > &m2)
Array< int > operator>= (Array< T > &m1, Array< T > &m2)
Array< int > operator== (Array< T > &m1, Array< T > &m2)
Array< int > operator!= (Array< T > &m1, Array< T > &m2)
Array< int > operator && (Array< T > &m, T v)
Array< int > operator && (T v, Array< T > &m)
Array< int > operator|| (Array< T > &m, T v)
Array< int > operator|| (T v, Array< T > &m)
Array< int > operator< (Array< T > &m, T v)
Array< int > operator< (T v, Array< T > &m)
Array< int > operator> (Array< T > &m, T v)
Array< int > operator> (T v, Array< T > &m)
Array< int > operator<= (Array< T > &m, T v)
Array< int > operator<= (T v, Array< T > &m)
Array< int > operator>= (Array< T > &m, T v)
Array< int > operator>= (T v, Array< T > &m)
Array< int > operator== (Array< T > &m, T v)
Array< int > operator== (T v, Array< T > &m)
Array< int > operator!= (Array< T > &m, T v)
Array< int > operator!= (T v, Array< T > &m)
Array< T > operator+ (Array< T > &m1, Array< T > &m2)
Array< T > operator- (Array< T > &m1, Array< T > &m2)
Array< T > operator * (Array< T > &m1, Array< T > &m2)
Array< T > operator/ (Array< T > &m1, Array< T > &m2)
Array< T > operator+ (Array< T > &m, T v)
Array< T > operator+ (T v, Array< T > &m)
Array< T > operator- (Array< T > &m, T v)
Array< T > operator- (T v, Array< T > &m)
Array< T > operator * (Array< T > &m, T v)
Array< T > operator * (T v, Array< T > &m)
Array< T > operator/ (Array< T > &m, T v)
Array< T > operator/ (T v, Array< T > &m)


Detailed Description

template<class T>
class CIMPL::Array< T >

Multi-dimensional Array class.

Definition at line 86 of file Array.h.


Constructor & Destructor Documentation

template<class T>
CIMPL::Array< T >::Array  ) 
 

Definition at line 68 of file Array.inl.

template<class T>
CIMPL::Array< T >::Array const   int  )  [explicit]
 

Definition at line 79 of file Array.inl.

template<class T>
CIMPL::Array< T >::Array const   int,
const   int
 

Definition at line 101 of file Array.inl.

template<class T>
CIMPL::Array< T >::Array const   int,
const   int,
const   int
 

Definition at line 125 of file Array.inl.

template<class T>
CIMPL::Array< T >::Array const   int,
const   int,
const   int,
const   int,
  ...
 

Definition at line 149 of file Array.inl.

template<class T>
CIMPL::Array< T >::Array const int  _ndims,
const int *  _dims
 

Definition at line 202 of file Array.inl.

template<class T>
CIMPL::Array< T >::Array Array< T > &  m  ) 
 

Definition at line 225 of file Array.inl.

template<class T>
CIMPL::Array< T >::~Array  ) 
 

Definition at line 245 of file Array.inl.

template<class T>
CIMPL::Array< T >::Array Matrix< T > &  m  ) 
 

Definition at line 1290 of file Array.inl.

template<class T>
CIMPL::Array< T >::Array Vector< T > &  m  ) 
 


Member Function Documentation

template<class T>
Array< T > & CIMPL::Array< T >::Add v  ) 
 

Definition at line 919 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::Add Array< T > &  m  ) 
 

Definition at line 838 of file Array.inl.

template<class T>
Array< T > CIMPL::Array< T >::Add Array< T > &  m1,
v2
[static]
 

Definition at line 750 of file Array.inl.

template<class T>
Array< T > CIMPL::Array< T >::Add Array< T > &  m1,
Array< T > &  m2
[static]
 

Definition at line 664 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::And Array< T > &  m,
v
[static]
 

Definition at line 551 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::And Array< T > &  m1,
Array< T > &  m2
[static]
 

Definition at line 392 of file Array.inl.

template<class T>
Array< T > CIMPL::Array< T >::Clone  )  const
 

Definition at line 271 of file Array.inl.

template<class T>
T * CIMPL::Array< T >::Data  )  [inline]
 

Definition at line 263 of file Array.inl.

template<class T>
const T * CIMPL::Array< T >::DataPtr  )  [inline]
 

Definition at line 257 of file Array.inl.

template<class T>
const int * CIMPL::Array< T >::Dims  )  const [inline]
 

Definition at line 319 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::Divide v  ) 
 

Definition at line 952 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::Divide Array< T > &  m  ) 
 

Definition at line 892 of file Array.inl.

template<class T>
Array< T > CIMPL::Array< T >::Divide v2,
Array< T > &  m1
[static]
 

Definition at line 816 of file Array.inl.

template<class T>
Array< T > CIMPL::Array< T >::Divide Array< T > &  m1,
v2
[static]
 

Definition at line 798 of file Array.inl.

template<class T>
Array< T > CIMPL::Array< T >::Divide Array< T > &  m1,
Array< T > &  m2
[static]
 

Definition at line 721 of file Array.inl.

template<class T>
T & CIMPL::Array< T >::Elem const int  i  )  [inline]
 

Array element access (sequential: column scan). Bounds are checked.

Definition at line 1136 of file Array.inl.

template<class T>
T & CIMPL::Array< T >::Elem const int  i,
const int  j,
  ...
[inline]
 

Array element access (dim1, dim2, dim3, ...). Bounds are checked.

Definition at line 1156 of file Array.inl.

template<class T>
T & CIMPL::Array< T >::ElemNC const int  i  )  [inline]
 

Array element access (sequential: column scan). Bounds are not checked.

Definition at line 1148 of file Array.inl.

template<class T>
T & CIMPL::Array< T >::ElemNC const int  i,
const int  j,
  ...
[inline]
 

Array element access (row,col). Bounds are not checked.

Definition at line 1199 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Eq Array< T > &  m,
v
[static]
 

Definition at line 629 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Eq Array< T > &  m1,
Array< T > &  m2
[static]
 

Definition at line 506 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Ge Array< T > &  m,
v
[static]
 

Definition at line 616 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Ge Array< T > &  m1,
Array< T > &  m2
[static]
 

Definition at line 487 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Gt Array< T > &  m,
v
[static]
 

Definition at line 590 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Gt Array< T > &  m1,
Array< T > &  m2
[static]
 

Definition at line 449 of file Array.inl.

template<class T>
void CIMPL::Array< T >::Init const T  init  )  [inline]
 

Definition at line 343 of file Array.inl.

template<class T>
bool CIMPL::Array< T >::IsCompatible Array< T > &  m1,
Array< T > &  m2
[static]
 

Definition at line 364 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Le Array< T > &  m,
v
[static]
 

Definition at line 603 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Le Array< T > &  m1,
Array< T > &  m2
[static]
 

Definition at line 468 of file Array.inl.

template<class T>
int CIMPL::Array< T >::Length  )  const [inline]
 

Definition at line 331 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Lt Array< T > &  m,
v
[static]
 

Definition at line 577 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Lt Array< T > &  m1,
Array< T > &  m2
[static]
 

Definition at line 430 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::Multiply v  ) 
 

Definition at line 941 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::Multiply Array< T > &  m  ) 
 

Definition at line 874 of file Array.inl.

template<class T>
Array< T > CIMPL::Array< T >::Multiply Array< T > &  m1,
v2
[static]
 

Definition at line 786 of file Array.inl.

template<class T>
Array< T > CIMPL::Array< T >::Multiply Array< T > &  m1,
Array< T > &  m2
[static]
 

Definition at line 702 of file Array.inl.

template<class T>
int CIMPL::Array< T >::NDims  )  const [inline]
 

Definition at line 337 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Ne Array< T > &  m,
v
[static]
 

Definition at line 642 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Ne Array< T > &  m1,
Array< T > &  m2
[static]
 

Definition at line 525 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::operator *= v  ) 
 

Definition at line 1276 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::operator *= Array< T > &  m  ) 
 

Definition at line 1251 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::operator!  )  [inline]
 

Definition at line 1044 of file Array.inl.

template<class T>
T & CIMPL::Array< T >::operator() const int  i,
const int  j,
  ...
[inline]
 

Definition at line 1092 of file Array.inl.

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

Definition at line 1068 of file Array.inl.

template<class T>
Array< T > CIMPL::Array< T >::operator+  )  [inline]
 

Definition at line 1027 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::operator+= v  ) 
 

Definition at line 1264 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::operator+= Array< T > &  m  ) 
 

Definition at line 1239 of file Array.inl.

template<class T>
Array< T > CIMPL::Array< T >::operator-  )  [inline]
 

Definition at line 1033 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::operator-= v  ) 
 

Definition at line 1270 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::operator-= Array< T > &  m  ) 
 

Definition at line 1245 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::operator/= v  ) 
 

Definition at line 1282 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::operator/= Array< T > &  m  ) 
 

Definition at line 1257 of file Array.inl.

template<class T>
Array<T>& CIMPL::Array< T >::operator= Vector< T > &  m  ) 
 

template<class T>
Array< T > & CIMPL::Array< T >::operator= Matrix< T > &  m  ) 
 

Definition at line 1003 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::operator= Array< T > &  m  ) 
 

Definition at line 982 of file Array.inl.

template<class T>
T & CIMPL::Array< T >::operator[] const int  i  )  [inline]
 

Definition at line 1083 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Or Array< T > &  m,
v
[static]
 

Definition at line 564 of file Array.inl.

template<class T>
Array< int > CIMPL::Array< T >::Or Array< T > &  m1,
Array< T > &  m2
[static]
 

Definition at line 411 of file Array.inl.

template<class T>
const int * CIMPL::Array< T >::Size  )  const [inline]
 

Definition at line 325 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::Subtract v  ) 
 

Definition at line 930 of file Array.inl.

template<class T>
Array< T > & CIMPL::Array< T >::Subtract Array< T > &  m  ) 
 

Definition at line 856 of file Array.inl.

template<class T>
Array< T > CIMPL::Array< T >::Subtract v2,
Array< T > &  m1
[static]
 

Definition at line 774 of file Array.inl.

template<class T>
Array< T > CIMPL::Array< T >::Subtract Array< T > &  m1,
v2
[static]
 

Definition at line 762 of file Array.inl.

template<class T>
Array< T > CIMPL::Array< T >::Subtract Array< T > &  m1,
Array< T > &  m2
[static]
 

Definition at line 683 of file Array.inl.

template<class T>
const int CIMPL::Array< T >::XDim  )  const [inline]
 

Definition at line 291 of file Array.inl.

template<class T>
const int CIMPL::Array< T >::YDim  )  const [inline]
 

Definition at line 297 of file Array.inl.

template<class T>
const int CIMPL::Array< T >::ZDim  )  const [inline]
 

Definition at line 308 of file Array.inl.


Friends And Related Function Documentation

template<class T>
friend class Matrix<T> [friend]
 

Definition at line 89 of file Array.h.

template<class T>
Array<int> operator && v,
Array< T > &  m
[friend]
 

Definition at line 267 of file Array.h.

template<class T>
Array<int> operator && Array< T > &  m,
v
[friend]
 

Definition at line 263 of file Array.h.

template<class T>
Array<int> operator && Array< T > &  m1,
Array< T > &  m2
[friend]
 

Definition at line 220 of file Array.h.

template<class T>
Array<T> operator * v,
Array< T > &  m
[friend]
 

Definition at line 388 of file Array.h.

template<class T>
Array<T> operator * Array< T > &  m,
v
[friend]
 

Definition at line 383 of file Array.h.

template<class T>
Array<T> operator * Array< T > &  m1,
Array< T > &  m2
[friend]
 

Definition at line 350 of file Array.h.

template<class T>
Array<int> operator!= v,
Array< T > &  m
[friend]
 

Definition at line 330 of file Array.h.

template<class T>
Array<int> operator!= Array< T > &  m,
v
[friend]
 

Definition at line 326 of file Array.h.

template<class T>
Array<int> operator!= Array< T > &  m1,
Array< T > &  m2
[friend]
 

Definition at line 255 of file Array.h.

template<class T>
Array<T> operator+ v,
Array< T > &  m
[friend]
 

Definition at line 368 of file Array.h.

template<class T>
Array<T> operator+ Array< T > &  m,
v
[friend]
 

Definition at line 363 of file Array.h.

template<class T>
Array<T> operator+ Array< T > &  m1,
Array< T > &  m2
[friend]
 

Definition at line 340 of file Array.h.

template<class T>
Array<T> operator- v,
Array< T > &  m
[friend]
 

Definition at line 378 of file Array.h.

template<class T>
Array<T> operator- Array< T > &  m,
v
[friend]
 

Definition at line 373 of file Array.h.

template<class T>
Array<T> operator- Array< T > &  m1,
Array< T > &  m2
[friend]
 

Definition at line 345 of file Array.h.

template<class T>
Array<T> operator/ v,
Array< T > &  m
[friend]
 

Definition at line 398 of file Array.h.

template<class T>
Array<T> operator/ Array< T > &  m,
v
[friend]
 

Definition at line 393 of file Array.h.

template<class T>
Array<T> operator/ Array< T > &  m1,
Array< T > &  m2
[friend]
 

Definition at line 355 of file Array.h.

template<class T>
Array<int> operator< v,
Array< T > &  m
[friend]
 

Definition at line 285 of file Array.h.

template<class T>
Array<int> operator< Array< T > &  m,
v
[friend]
 

Definition at line 281 of file Array.h.

template<class T>
Array<int> operator< Array< T > &  m1,
Array< T > &  m2
[friend]
 

Definition at line 230 of file Array.h.

template<class T>
Array<int> operator<= v,
Array< T > &  m
[friend]
 

Definition at line 303 of file Array.h.

template<class T>
Array<int> operator<= Array< T > &  m,
v
[friend]
 

Definition at line 299 of file Array.h.

template<class T>
Array<int> operator<= Array< T > &  m1,
Array< T > &  m2
[friend]
 

Definition at line 240 of file Array.h.

template<class T>
Array<int> operator== v,
Array< T > &  m
[friend]
 

Definition at line 321 of file Array.h.

template<class T>
Array<int> operator== Array< T > &  m,
v
[friend]
 

Definition at line 317 of file Array.h.

template<class T>
Array<int> operator== Array< T > &  m1,
Array< T > &  m2
[friend]
 

Definition at line 250 of file Array.h.

template<class T>
Array<int> operator> v,
Array< T > &  m
[friend]
 

Definition at line 294 of file Array.h.

template<class T>
Array<int> operator> Array< T > &  m,
v
[friend]
 

Definition at line 290 of file Array.h.

template<class T>
Array<int> operator> Array< T > &  m1,
Array< T > &  m2
[friend]
 

Definition at line 235 of file Array.h.

template<class T>
Array<int> operator>= v,
Array< T > &  m
[friend]
 

Definition at line 312 of file Array.h.

template<class T>
Array<int> operator>= Array< T > &  m,
v
[friend]
 

Definition at line 308 of file Array.h.

template<class T>
Array<int> operator>= Array< T > &  m1,
Array< T > &  m2
[friend]
 

Definition at line 245 of file Array.h.

template<class T>
Array<int> operator|| v,
Array< T > &  m
[friend]
 

Definition at line 276 of file Array.h.

template<class T>
Array<int> operator|| Array< T > &  m,
v
[friend]
 

Definition at line 272 of file Array.h.

template<class T>
Array<int> operator|| Array< T > &  m1,
Array< T > &  m2
[friend]
 

Definition at line 225 of file Array.h.

template<class T>
friend class Vector<T> [friend]
 

Definition at line 90 of file Array.h.


Member Data Documentation

template<class T>
Cleaner<T>* CIMPL::Array< T >::clean [protected]
 

Definition at line 98 of file Array.h.

template<class T>
T* CIMPL::Array< T >::data [protected]
 

Definition at line 94 of file Array.h.

template<class T>
int* CIMPL::Array< T >::dims [protected]
 

Definition at line 97 of file Array.h.

template<class T>
int CIMPL::Array< T >::length [protected]
 

Definition at line 96 of file Array.h.

template<class T>
int CIMPL::Array< T >::ndims [protected]
 

Definition at line 95 of file Array.h.


The documentation for this class was generated from the following files:
Generated on Thu Jan 20 08:43:50 2005 for CIMPL by  doxygen 1.3.9.1