class HCL_LinCombLinearOp_d : public HCL_LinearOp_d

HCL_LinCombLinearOp_d is a concrete class implementing a linear combination of one or more linear operators

Inheritance:


Public Methods

HCL_LinCombLinearOp_d ( HCL_VectorSpace_d * d, HCL_VectorSpace_d * r, int n )
Usual constructor
HCL_LinCombLinearOp_d ( HCL_LinearOp_d * op1, double a1, HCL_LinearOp_d * op2, double a2 )
Provided for convenience
virtual HCL_VectorSpace_d& Domain () const
Domain space access
virtual HCL_VectorSpace_d& Range () const
Range space access
Table& Parameters ()
Access to parameter table
virtual void Image ( const HCL_Vector_d & x, HCL_Vector_d & y ) const
Image computes the action of the operator on x, giving y.
virtual void AdjImage ( const HCL_Vector_d & y, HCL_Vector_d & x ) const
AdjImage computes the action of the adjoint on y, giving x.
virtual void InvImage (const HCL_Vector_d & y, HCL_Vector_d & x) const
InvImage returns an error message (unimplemented).
virtual void InvAdjImage (const HCL_Vector_d & x, HCL_Vector_d & y) const
InvAdjImage returns an error message (unimplemented)
virtual void ImageAdd (const HCL_Vector_d & x, const HCL_Vector_d & z, HCL_Vector_d & y, double a=1.0, double b=1.0) const
ImageAdd implements
virtual void AdjImageAdd (const HCL_Vector_d & x, const HCL_Vector_d & z, HCL_Vector_d & y, double a=1.0, double b=1.0) const
AdjImageAdd implements
virtual void ImageAdd (const HCL_Vector_d & x, HCL_Vector_d & y, double a=1.0, double b=1.0) const
ImageAdd implements
virtual void AdjImageAdd (const HCL_Vector_d & x, HCL_Vector_d & y, double a=1.0, double b=1.0) const
AdjImageAdd implements
void SetNext ( HCL_LinearOp_d * L, double a )
SetNext is used for initializing the terms in the linear combination
virtual ostream& Write ( ostream & str ) const
Debugging information

Inherited from HCL_LinearOp_d:

Public Methods

int CheckAdj(int Display = 1, double tol = 1000 )
virtual void NormalImage( const HCL_Vector_d & x, HCL_Vector_d & z ) const
int CheckNormal( int display = 1, double tol = 100 )
virtual void NormalImageAdd(const HCL_Vector_d & x, const HCL_Vector_d & z, HCL_Vector_d & y, double a=1.0, double b=1.0) const
virtual void InvImageAdd(const HCL_Vector_d & x, const HCL_Vector_d & z, HCL_Vector_d & y, double a=1.0, double b=1.0) const
virtual void InvAdjImageAdd(const HCL_Vector_d & x, const HCL_Vector_d & z, HCL_Vector_d & y, double a=1.0, double b=1.0) const
virtual void NormalImageAdd(const HCL_Vector_d & x, HCL_Vector_d & y, double a=1.0, double b=1.0) const
virtual void InvImageAdd(const HCL_Vector_d & x, HCL_Vector_d & y, double a=1.0, double b=1.0) const
virtual void InvAdjImageAdd(const HCL_Vector_d & x, HCL_Vector_d & y, double a=1.0, double b=1.0) const

Inherited from HCL_Base:

Public Methods

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

Documentation

HCL_LinCombLinearOp_d is a concrete class implementing a linear combination of one or more linear operators. This class is useful for combining existing linear operators to create a new operator.

The primary methods are exactly the same as those of HCL_LinearOp_d. In addition, the Parameters method allows the weights in the linear combination to be accessed or changed.

There are two constructors. The usual constructor takes (pointers to) the domain and range spaces, as well as the number of operators in the sum. The operators and their weights are then specified one-by-one using the SetNext method. Here is an example:

// X and Y are instances of HCL_VectorSpace_d, and L1,L2,L3 are instances
// of HCL_LinearOp_d, each with domain X and range Y.
// The following constructs the operator M = 2L1-3.7L2+L3.

HCL_LinCombLinearOp_d M( &X,&Y,3 );
M.SetNext( &L1,2.0 );
M.SetNext( &L2,-3.7 );
M.SetNext( &L3,1.0 );

// M is now ready to use.

The second constructor is provided for convenience in the special case of a linear combination of two operators.

// The next line constructs the operator M = 2L1-3.7L2.

HCL_LinCombLinearOp_d M( &L1,2.0,&L2,-3.7 );

// M is now ready to use.
HCL_LinCombLinearOp_d( HCL_VectorSpace_d * d, HCL_VectorSpace_d * r, int n )
Usual constructor. Requires that the domain and range space be given (for error checking), along with the number of terms in the sum. The operators and weights are added one-by-one using the SetNext method.

HCL_LinCombLinearOp_d( HCL_LinearOp_d * op1, double a1, HCL_LinearOp_d * op2, double a2 )
Provided for convenience. This constructor makes it easy to create a linear combination with two terms. Pointers to the two operators (Op1 and Op2) and their weights (a1 and a2) must be given.

virtual HCL_VectorSpace_d& Domain() const
Domain space access. Returns a reference to the domain of the operator, which is an HCL_VectorSpace_d.

virtual HCL_VectorSpace_d& Range() const
Range space access. Returns a reference to the range of the operator, which is an HCL_VectorSpace_d.

Table& Parameters()
Access to parameter table. The weights for the linear combination can be accessed with Parameters().GetArrayValue( "Weights",i,val ) or changed with Parameters().PutArrayValue( "Weights",i,val ).

virtual void Image( const HCL_Vector_d & x, HCL_Vector_d & y ) const
Image computes the action of the operator on x, giving y.

virtual void AdjImage( const HCL_Vector_d & y, HCL_Vector_d & x ) const
AdjImage computes the action of the adjoint on y, giving x.

virtual void InvImage(const HCL_Vector_d & y, HCL_Vector_d & x) const
InvImage returns an error message (unimplemented).

virtual void InvAdjImage(const HCL_Vector_d & x, HCL_Vector_d & y) const
InvAdjImage returns an error message (unimplemented)

virtual void ImageAdd(const HCL_Vector_d & x, const HCL_Vector_d & z, HCL_Vector_d & y, double a=1.0, double b=1.0) const
ImageAdd implements

virtual void AdjImageAdd(const HCL_Vector_d & x, const HCL_Vector_d & z, HCL_Vector_d & y, double a=1.0, double b=1.0) const
AdjImageAdd implements

virtual void ImageAdd(const HCL_Vector_d & x, HCL_Vector_d & y, double a=1.0, double b=1.0) const
ImageAdd implements

virtual void AdjImageAdd(const HCL_Vector_d & x, HCL_Vector_d & y, double a=1.0, double b=1.0) const
AdjImageAdd implements

void SetNext( HCL_LinearOp_d * L, double a )
SetNext is used for initializing the terms in the linear combination. A pointer to the next operator (L) and its weight (a) must be given.

virtual ostream& Write( ostream & str ) const
Debugging information. Prints out the weights in the linear combination, and invokes the Write method for each linear operator.


This class has no child classes.

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