Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

CrystVector< T > Class Template Reference

Vector library (Blitz++ mimic) for ObjCryst++. More...

Collaboration diagram for CrystVector< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CrystVector ()
 CrystVector (const long nbElements)
 CrystVector (const CrystVector &old)
 ~CrystVector ()
void operator= (const CrystVector &old)
template<class U> void operator= (const CrystVector< U > &old)
template<class U>  operator CrystVector () const
void reference (CrystVector &old)
long numElements () const
sum () const
min () const
max () const
unsigned long imin (const unsigned long start=0, const unsigned long finish=0) const
 Find index of minimum, between start and end (if start==end, use full vector).

unsigned long imax (const unsigned long start=0, const unsigned long finish=0) const
 Find index of maximum, between start and end (if start==end, use full vector).

T * data ()
const T * data () const
void resize (const long newNbElements)
void resizeAndPreserve (const long newNbElements)
void operator *= (const T num)
void operator *= (const CrystVector &vect)
void operator/= (const T num)
void operator+= (const T num)
void operator+= (const CrystVector &vect)
void operator-= (const CrystVector &vect)
void operator= (const T num)
operator() (const long i) const
T & operator() (const long i)

Private Attributes

T * mpData
long mNumElements
bool mIsAreference

Detailed Description

template<class T>
class CrystVector< T >

Vector library (Blitz++ mimic) for ObjCryst++.

The CrystVector library is not a new array computation library, despite the appearances. ObjCryst++ should used the Blitz++ array library , which yields excellent performance and simple array expressions. Unfortunately, the memory required to compile the library using gcc is far too high to be reasonable when using complex expressions and optimizing code. So until this has changed, The CrystVector and CrystMatrix library have been created, and these emulate (supposedly exactly) the Blitz++ interface (but not the smart handling of mathematical expressions, so pointers must be used). For documentation about these two libraries you should read the Blitz++ documentation. CrystVector and CrystMatrix use the same kind of storage in memory.

You can use CrystVector_REAL, CrystVector_long,etc... to declare 1D vectors. Macros ensure (well, should) ensure compatibility with Blitz++. (as of april 2001 support of blitz++ is broken).

Todo:
check again Blitz++ support in newer gcc versions.


Constructor & Destructor Documentation

template<class T>
CrystVector< T >::CrystVector  ) 
 

template<class T>
CrystVector< T >::CrystVector const long  nbElements  ) 
 

template<class T>
CrystVector< T >::CrystVector const CrystVector< T > &  old  ) 
 

template<class T>
CrystVector< T >::~CrystVector  ) 
 


Member Function Documentation

template<class T>
const T* CrystVector< T >::data  )  const
 

template<class T>
T* CrystVector< T >::data  ) 
 

template<class T>
unsigned long CrystVector< T >::imax const unsigned long  start = 0,
const unsigned long  finish = 0
const
 

Find index of maximum, between start and end (if start==end, use full vector).

template<class T>
unsigned long CrystVector< T >::imin const unsigned long  start = 0,
const unsigned long  finish = 0
const
 

Find index of minimum, between start and end (if start==end, use full vector).

template<class T>
T CrystVector< T >::max  )  const
 

template<class T>
T CrystVector< T >::min  )  const
 

template<class T>
long CrystVector< T >::numElements  )  const
 

template<class T>
void CrystVector< T >::operator *= const CrystVector< T > &  vect  ) 
 

template<class T>
void CrystVector< T >::operator *= const T  num  ) 
 

template<class T>
template<class U>
CrystVector< T >::operator CrystVector  )  const
 

template<class T>
T& CrystVector< T >::operator() const long  i  ) 
 

template<class T>
T CrystVector< T >::operator() const long  i  )  const
 

template<class T>
void CrystVector< T >::operator+= const CrystVector< T > &  vect  ) 
 

template<class T>
void CrystVector< T >::operator+= const T  num  ) 
 

template<class T>
void CrystVector< T >::operator-= const CrystVector< T > &  vect  ) 
 

template<class T>
void CrystVector< T >::operator/= const T  num  ) 
 

template<class T>
void CrystVector< T >::operator= const T  num  ) 
 

template<class T>
template<class U>
void CrystVector< T >::operator= const CrystVector< U > &  old  ) 
 

template<class T>
void CrystVector< T >::operator= const CrystVector< T > &  old  ) 
 

template<class T>
void CrystVector< T >::reference CrystVector< T > &  old  ) 
 

template<class T>
void CrystVector< T >::resize const long  newNbElements  ) 
 

template<class T>
void CrystVector< T >::resizeAndPreserve const long  newNbElements  ) 
 

template<class T>
T CrystVector< T >::sum  )  const
 


Member Data Documentation

template<class T>
bool CrystVector< T >::mIsAreference [private]
 

template<class T>
long CrystVector< T >::mNumElements [private]
 

template<class T>
T* CrystVector< T >::mpData [private]
 


The documentation for this class was generated from the following file:
Generated on Tue Nov 14 15:03:40 2006 for ObjCryst++ by doxygen 1.3.6