class HCL_EuclideanVector_d : public HCL_Vector_d

HCL_EuclideanVector_d is the base class for vectors permitting componentwise operations

Inheritance:


Public

Access to components.
virtual double operator) ( int i )
returns value, does not permit change of data array
virtual double& operator) ( int i )
returns reference, permits change of data array
Access to dimension
virtual int Dim ()
returns dimension of space
Array operations - ``Matlab'' methods.
virtual void Fill ( double a )
virtual void Zero ()
virtual void Random ()
pseudorandom numbers uniformly distributed between -1 and 1
virtual void Add ( double a )
- overload of Add(...) with scalar argument a la Matlab
virtual void Add ( const HCL_Vector_d & x, double a )
- overload of Add(...) with scalar argument a la Matlab
virtual void DiagScale ( const HCL_EuclideanVector_d & x )
- matrix multiply by diag(x)
virtual void DiagScale ( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )
virtual void DiagRecipScale ( const HCL_EuclideanVector_d & x, double tol=0.0)
- matrix division by diag(x)
virtual void DiagRecipScale ( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y, double tol=0.0)
- matrix division by diag(x)
virtual void DotStar ( const HCL_EuclideanVector_d & x )
"Matlab" name for DiagScale, first version
virtual void DotStar ( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )
"Matlab" name for DiagScale, second version
virtual void DotSlash ( const HCL_EuclideanVector_d & x, double tol=0.0)
"Matlab" name for DiagRecipScale, first version.
virtual void DotSlash ( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y, double tol=0.0)
"Matlab" name for DiagRecipScale, second version.
virtual double Max ()
returns largest of components or -FLT_MAX
virtual void Max ( const HCL_EuclideanVector_d & x )
virtual void Max ( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )
virtual double Min ()
returns smallest of components or FLT_MAX
virtual void Min ( const HCL_EuclideanVector_d & x )
virtual void Min ( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )
virtual double Sum ()
returns
virtual void Abs ()
virtual void Abs ( const HCL_EuclideanVector_d & x )
virtual void Sign ()
virtual void Sign ( double t )
virtual void Sign ( const HCL_EuclideanVector_d & x )
virtual void Sign ( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )
virtual void Sign ( const HCL_EuclideanVector_d & x, double t )
virtual void Sign ( double t, const HCL_EuclideanVector_d & y )
virtual void Greater ( double t )
Mask function: if > , else 0
virtual void Greater ( const HCL_EuclideanVector_d & x )
Mask function: if > , else 0
virtual void Greater ( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )
Mask function: if > , else 0
virtual void Greater ( const HCL_EuclideanVector_d & x, double t )
Mask function: if > , else 0
virtual void Greater ( double t, const HCL_EuclideanVector_d & x )
Mask function: if > , else 0
virtual void Power ( double p )
- arbitrary real power
virtual void Power ( double p, const HCL_EuclideanVector_d & x )
- arbitrary real power
virtual void Sqrt ()
- componentwise square root
virtual void Sqrt ( const HCL_EuclideanVector_d & x )
- componentwise square root
virtual void Exp ()
virtual void Exp ( const HCL_EuclideanVector_d & x )
virtual void Log ()
- componentwise natural log
virtual void Log ( const HCL_EuclideanVector_d & x )
- componentwise natural log
constructors and destructor
HCL_EuclideanVector_d ()
Default constructor.
HCL_EuclideanVector_d ( const HCL_EuclideanVector_d & x)
Copy constructor
virtual ~HCL_EuclideanVector_d ()
destructor
Subarray extraction.
virtual HCL_EuclideanVector_d* SubArray (int begin, int end)
returns subarray of components starting with begin, ending with end
virtual HCL_EuclideanVector_d* SubArray (int begin, int stride, int end)
same but with index increment stride

Inherited from HCL_Vector_d:

Public Methods

virtual ostream& Write(ostream &)

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_EuclideanVector_d is the base class for vectors permitting componentwise operations. It in addition to the basic vector operations inherited from HCL_Vector, it defines diagonal scaling, max, min, abs, sum, and other "Matlab" operations depending on component access. It also defines access to individual components, though none of the operations are defined in terms of these and we expect concrete classes to be implemented with lower-level component access for efficiency.
constructors and destructor

HCL_EuclideanVector_d()
Default constructor.

HCL_EuclideanVector_d( const HCL_EuclideanVector_d & x)
Copy constructor

virtual ~HCL_EuclideanVector_d()
destructor

Access to dimension

virtual int Dim()
returns dimension of space

Access to components.
Provided in anticipation of popular demand. Not used to define any of the componentwise operations - we expect that concrete subclasses will define these by lower-level access to the data, which is much more efficient. Just as in Matlab, your algorithm will run faster if you use the array intrinsics rather than loop over component references. In other words, don't use these if you can help it!!!

virtual double operator)( int i )
returns value, does not permit change of data array

virtual double& operator)( int i )
returns reference, permits change of data array

Subarray extraction.

virtual HCL_EuclideanVector_d* SubArray(int begin, int end)
returns subarray of components starting with begin, ending with end

virtual HCL_EuclideanVector_d* SubArray(int begin, int stride, int end)
same but with index increment stride

Array operations - ``Matlab'' methods.
In describing these, denotes the ith component of the current array, i.e. the data array of the HCL_EuclideanVector object

virtual void Fill( double a )

virtual void Zero()

virtual void Random()
pseudorandom numbers uniformly distributed between -1 and 1

virtual void Add( double a )
- overload of Add(...) with scalar argument a la Matlab

virtual void Add( const HCL_Vector_d & x, double a )
- overload of Add(...) with scalar argument a la Matlab

virtual void DiagScale( const HCL_EuclideanVector_d & x )
- matrix multiply by diag(x)

virtual void DiagScale( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )

virtual void DiagRecipScale( const HCL_EuclideanVector_d & x, double tol=0.0)
- matrix division by diag(x). Safeguarded against overflow - if tol is less that the smallest safe divisor sfmin as defined by LAPACK::[SD]LAMCH, then tol is replaced by sfmin - thus the default is tol=0.0, which effectively means tol=sfmin.

virtual void DiagRecipScale( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y, double tol=0.0)
- matrix division by diag(x). Safeguarded against overflow - if tol is less that the smallest safe divisor sfmin as defined by LAPACK::[SD]LAMCH, then tol is replaced by sfmin - thus the default is tol=0.0, which effectively means tol=sfmin.

virtual void DotStar( const HCL_EuclideanVector_d & x )
"Matlab" name for DiagScale, first version

virtual void DotStar( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )
"Matlab" name for DiagScale, second version

virtual void DotSlash( const HCL_EuclideanVector_d & x, double tol=0.0)
"Matlab" name for DiagRecipScale, first version.

virtual void DotSlash( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y, double tol=0.0)
"Matlab" name for DiagRecipScale, second version.

virtual double Max()
returns largest of components or -FLT_MAX

virtual void Max( const HCL_EuclideanVector_d & x )

virtual void Max( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )

virtual double Min()
returns smallest of components or FLT_MAX

virtual void Min( const HCL_EuclideanVector_d & x )

virtual void Min( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )

virtual double Sum()
returns

virtual void Abs()

virtual void Abs( const HCL_EuclideanVector_d & x )

virtual void Sign()
. Sign returns 1 for positive arguments, -1 for negative arguments, and 0 for zero arguments.

virtual void Sign( double t )

virtual void Sign( const HCL_EuclideanVector_d & x )

virtual void Sign( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )

virtual void Sign( const HCL_EuclideanVector_d & x, double t )

virtual void Sign( double t, const HCL_EuclideanVector_d & y )

virtual void Greater( double t )
Mask function: if > , else 0

virtual void Greater( const HCL_EuclideanVector_d & x )
Mask function: if > , else 0

virtual void Greater( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )
Mask function: if > , else 0

virtual void Greater( const HCL_EuclideanVector_d & x, double t )
Mask function: if > , else 0

virtual void Greater( double t, const HCL_EuclideanVector_d & x )
Mask function: if > , else 0

virtual void Power( double p )
- arbitrary real power. Should only be invoked for nonintegral when , but have not found a good way to enforce this constraint, so rely on runtime

virtual void Power( double p, const HCL_EuclideanVector_d & x )
- arbitrary real power. should only be invoked for nonintegral when , but have not found a good way to enforce this constraint, so rely on runtime

virtual void Sqrt()
- componentwise square root. exits with error condition if any component is negative.

virtual void Sqrt( const HCL_EuclideanVector_d & x )
- componentwise square root. exits with error condition if any component is negative.

virtual void Exp()

virtual void Exp( const HCL_EuclideanVector_d & x )

virtual void Log()
- componentwise natural log. exits with error condition if any component is negative.

virtual void Log( const HCL_EuclideanVector_d & x )
- componentwise natural log. exits with error condition if any component is negative.


Direct child classes:
HCL_RnVector_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