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

CrystVector Class Template Reference

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

#include <CrystVector.h>

List of all members.

Public Methods

 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
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_double, 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.


The documentation for this class was generated from the following file:
Generated on Wed Nov 14 19:48:36 2001 for ObjCryst++ by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001