FOX/ObjCryst++  1.10.X (development)
CrystMatrix< T > Class Template Reference

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

Classes

class  ListInitializer
 
class  ListInitializerSwitch
 

Public Member Functions

 CrystMatrix (const long ySize, const long xSize)
 
 CrystMatrix (const CrystMatrix &old)
 
void operator= (const CrystMatrix &old)
 
void reference (CrystMatrix &old)
 
long numElements () const
 
long size () const
 
sum () const
 
min () const
 
max () const
 
long rows () const
 
long cols () const
 
T * data ()
 
const T * data () const
 
void resize (const long ySize, const long xSize)
 
void resizeAndPreserve (const long ySize, const long xSize)
 
void operator*= (const T num)
 Element-by element multiplication (array-like)
 
void operator*= (const CrystMatrix &vect)
 Element-by element multiplication (array-like)
 
void operator/= (const T num)
 Element-by element division (array-like)
 
void operator+= (const T num)
 Element-by element addition (array-like)
 
void operator-= (const T num)
 Element-by element substraction (array-like)
 
CrystMatrix Mult (const CrystMatrix &rhs)
 matrix multiplication (linear algebra)
 
ListInitializerSwitch operator= (const T num)
 
operator() (const long i) const
 
operator() (const long row, const long col) const
 
T & operator() (const long i)
 
T & operator() (const long i, const long j)
 
CrystMatrix transpose () const
 

Private Attributes

T * mpData
 
long mNumElements
 
long mXSize
 
long mYSize
 
bool mIsAreference
 

Detailed Description

template<class T>
class CrystMatrix< T >

2D 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 CrystMatrix_REAL, CrystMatrix_long,etc... to declare 2D vectors. Macros ensure (well, should) ensure compatibility with Blitz++. (as of april 2001 support of blitz++ is broken).

Definition at line 339 of file CrystVector.h.


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