class HCL_Vector_d : public HCL_Base

HCL_Vector_d is the base class for all vectors in HCL

Inheritance:


Public Methods

virtual ostream& Write (ostream &)
Debugging information

Public

Vector operations (z is *this, which is C++-ese for the instance of the class invoking the method)
virtual void Copy ( const HCL_Vector_d & x )
z <-- x
virtual void Neg ()
z <-- -z
virtual void Mul ( const double & a )
z <-- a*z
virtual void Add ( const HCL_Vector_d & x )
z <-- z + x
virtual void Mul ( const double & a, const HCL_Vector_d & x )
z <-- a*x
virtual void Add ( const HCL_Vector_d & x, const HCL_Vector_d & y )
z <-- x + y
virtual void Sub ( const HCL_Vector_d & x )
z <-- z - x
virtual void Sub (const HCL_Vector_d & x, const HCL_Vector_d & y )
z <-- x - y
virtual void ScaleAdd (const double & a, const HCL_Vector_d & x )
z <-- a*z + x
virtual void AddScale (const double & a, const HCL_Vector_d & x )
z <-- z + a*x
virtual void AddScale (const double & a, const HCL_Vector_d & x, const HCL_Vector_d & y )
z <-- x + a*y
virtual double Inner ( const HCL_Vector_d & x )
Inner product of z with x.
virtual double Norm ()
Norm of z.
virtual double Norm2 ()
Norm squared of z.
virtual HCL_VectorSpace_d& Space ()
Returns a reference to the space of which z is a member
virtual void Zero ()
z <-- 0
virtual void Random ()
Returns a "random" vector

Inherited from HCL_Base:

Public Methods

int Count()
void DecCount()
void IncCount()

Private Fields

int ReferenceCount

Documentation

HCL_Vector_d is the base class for all vectors in HCL. Vectors are implemented as concrete classes derived from HCL_Vector_d so that the optimization code need make no assumptions about the data structures used to implement the vectors. This is essential when nonstandard data structures (such as disk files for very large problems) are used.

A vector in HCL represents a completely abstract vector in a Hilbert space. Thus this class does not explicitly refer to coordinates. Many optimization algorithms do not need to use coordinates, and, for such algorithms, this is the right level of abstractions. Certain problems or algorithms require a finite-dimensional vector space with explicit coordinates (e.g. inequality constraints are naturally represented by an operator mapping an abstract Hilbert space to a finite-dimensional space). To define such a coordinate-based space, see the derived class HCL_EuclideanVector_d.

Note that each class derived from HCL_Vector_d must correspond to a class derived from HCL_VectorSpace_d. That is, if one wishes to create a class MyVector, derived from HCL_Vector_d, one is obligated to first define MyVectorSpace, derived from HCL_VectorSpace_d.

Vector operations (z is *this, which is C++-ese for the instance of the class invoking the method)

virtual void Copy( const HCL_Vector_d & x )
z <-- x

virtual void Neg()
z <-- -z

virtual void Mul( const double & a )
z <-- a*z

virtual void Add( const HCL_Vector_d & x )
z <-- z + x

virtual void Mul( const double & a, const HCL_Vector_d & x )
z <-- a*x

virtual void Add( const HCL_Vector_d & x, const HCL_Vector_d & y )
z <-- x + y

virtual void Sub( const HCL_Vector_d & x )
z <-- z - x

virtual void Sub(const HCL_Vector_d & x, const HCL_Vector_d & y )
z <-- x - y

virtual void ScaleAdd(const double & a, const HCL_Vector_d & x )
z <-- a*z + x

virtual void AddScale(const double & a, const HCL_Vector_d & x )
z <-- z + a*x

virtual void AddScale(const double & a, const HCL_Vector_d & x, const HCL_Vector_d & y )
z <-- x + a*y

virtual double Inner( const HCL_Vector_d & x )
Inner product of z with x.

virtual double Norm()
Norm of z.

virtual double Norm2()
Norm squared of z.

virtual HCL_VectorSpace_d& Space()
Returns a reference to the space of which z is a member

virtual void Zero()
z <-- 0

virtual void Random()
Returns a "random" vector. The meaning of random is left up to the implementor of each derived class.

virtual ostream& Write(ostream &)
Debugging information. Write should be implemented to print a description of the object that will be useful for debugging. If a complete description is lengthy, an implementor should consider just printing out a useful subset. This method will likely be used to send information to the screen when a error condition is encountered.


Direct child classes:
HCL_ProductVector_d
HCL_EuclideanVector_d
SGFVector_d

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de