HCL_VectorSpace_d is the base class for all vector spaces in HCL
![]() | GetType () Get type of vector space for comparison |
![]() | HCL_VectorSpace_d (const HCL_VectorSpace_d & x) Copy constructor |
![]() | Member () Virtual constructor |
![]() | operator != (const HCL_VectorSpace_d &) Operator != |
![]() | operator == (const HCL_VectorSpace_d &) Operator == |
![]() | Replicate () Virtual copy constructor |
![]() | Test ( int display = 0, double tol = 100 ) Test routine |
![]() | Write (ostream &) Debugging information |
HCL_VectorSpace_d is the base class for all vector spaces in HCL. The purpose of a vector space in HCL is two-fold.
- Instead of being a set of vectors (as it should be mathematically), a HCL_VectorSpace_d is really a description of a certain type of vector. Therefore, two vectors are compatible (e.g. can be added) if they belong to the same vector space, i.e. if their descriptions are the same (note that a vector knows its space; see HCL_Vector_d).
Example:
if( x.Space() != y.Space() ) // Check whether x and y are compatible // Error condition- A HCL_VectorSpace_d knows how to construct a vector belonging to it, using the Member method. Thus, if in an algorithm one needs a temporary vector (to store an intermediate calculation, say), it can be constructed from the vector space,
without the algorithm knowing the exact type of vector involved .Example:
HCL_Vector_d * xtemp = x.Space().Member(); // Get a vector like x
virtual int operator == (const HCL_VectorSpace_d &)
virtual int operator != (const HCL_VectorSpace_d &)
virtual void* GetType()
virtual HCL_Vector_d* Member()
virtual HCL_VectorSpace_d* Replicate()
MyVectorSpace::Replicate()
{
return new MyVectorSpace( *this );
}
int Test( int display = 0, double tol = 100 )
virtual ostream& Write(ostream &)
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de