HCL_EuclideanVector_d is the base class for vectors permitting componentwise operations
![]() | Access to components.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | Access to dimension
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | Array operations - ``Matlab'' methods.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | constructors and destructor
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | Subarray extraction.
|
Vector operations (z is *this, which is C++-ese for the instance of the class invoking the method)
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.
HCL_EuclideanVector_d( const HCL_EuclideanVector_d & x)
virtual double& operator)( int i )
virtual HCL_EuclideanVector_d* SubArray(int begin, int stride, int end)
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 )
virtual void DotStar( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )
virtual void DotSlash( const HCL_EuclideanVector_d & x, double tol=0.0)
virtual void DotSlash( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y, double tol=0.0)
virtual double 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()
virtual void Min( const HCL_EuclideanVector_d & x )
virtual void Min( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )
virtual double Sum()
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 )
if
>
, else 0
virtual void Greater( const HCL_EuclideanVector_d & x )
if
>
, else 0
virtual void Greater( const HCL_EuclideanVector_d & x, const HCL_EuclideanVector_d & y )
if
>
, else 0
virtual void Greater( const HCL_EuclideanVector_d & x, double t )
if
>
, else 0
virtual void Greater( double t, const HCL_EuclideanVector_d & x )
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.
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de