class HCL_OpDerivAdj_d : public HCL_Op_d

HCL_OpDerivAdj_d is the base class for (presumably nonlinear) operators which know how to compute their derivatives as linear operators with adjoints

Inheritance:


Public Methods

int CheckDeriv ( const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
Check analytic derivative
virtual HCL_LinearOpAdj_d* DerivAdj ( const HCL_Vector_d & x )
DerivAdj computes the derivative, as a HCL_LinearOpAdj_d, of the operator at x
virtual HCL_EvaluateOpDerivAdj_d* EvaluateDerivAdj ( const HCL_Vector_d & x )
EvaluateDerivAdj creates an evaluation object which knows how to compute the image and the derivative (as a linear operator with adjoint) at a point
virtual void Image ( const HCL_Vector_d & x, HCL_Vector_d & y )
Image computes the action of the operator on x, giving y
virtual ostream& Write ( ostream & str )
Debugging information

Inherited from HCL_Op_d:

Public Methods

int CheckPartialDeriv( const HCL_Vector_d &, const HCL_Vector_d &, int ind, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
virtual const HCL_LinearOpAdj_d& DerivAdjRef()
virtual HCL_VectorSpace_d& Domain()
virtual HCL_VectorSpace_d& Domain()
virtual HCL_VectorSpace_d& Domain()
HCL_EvalOpProductDomainDerivAdj_d( int n )
virtual double MaxStep( const HCL_Vector_d & x, const HCL_Vector_d &dir)
virtual HCL_LinearOpAdj_d* PartialDerivAdj( int i )
virtual HCL_LinearOpAdj_d* PartialDerivAdj( const HCL_Vector_d & x, int i )
virtual const HCL_LinearOpAdj_d& PartialDerivAdjRef( int i )
virtual HCL_ProductVectorSpace_d& ProductDomain()
virtual HCL_ProductVectorSpace_d& ProductDomain()
virtual HCL_VectorSpace_d& Range()
virtual HCL_VectorSpace_d& Range()
virtual HCL_VectorSpace_d& Range()

Inherited from HCL_Base:

Public Methods

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

Private Fields

int ReferenceCount

Documentation

HCL_OpDerivAdj_d is the base class for (presumably nonlinear) operators which know how to compute their derivatives as linear operators with adjoints. Such an operator maps one vector space into another, say F:X --> Y.

The primary methods of this class are:

In order to define a concrete derived class, one must first define a corresponding HCL_EvaluateOpDerivAdj_d class. Defining operators is expected to be one of the main activities of users of HCL, since the many optimization problems involve operators in the definition of the objective function or constraints. Please see one of the test programs that comes in the HCLtest directory for examples.

virtual HCL_EvaluateOpDerivAdj_d* EvaluateDerivAdj( const HCL_Vector_d & x )
EvaluateDerivAdj creates an evaluation object which knows how to compute the image and the derivative (as a linear operator with adjoint) at a point. The purpose of using an evaluation object in place of getting the image or derivative directly is that, for many operators, the computation of the image and derivative involve some common intermediate calculations. These calculations can be done once (at each point) in the evaluation object.

virtual void Image( const HCL_Vector_d & x, HCL_Vector_d & y )
Image computes the action of the operator on x, giving y. It does this by creating an evaluation object via EvaluateDerivAdj, extracting the image, and deleting the evaluation object. This method is defined in this (the base) class, so it need not be redefined in concrete derived classes.

virtual HCL_LinearOpAdj_d* DerivAdj( const HCL_Vector_d & x )
DerivAdj computes the derivative, as a HCL_LinearOpAdj_d, of the operator at x. It does this by creating an evaluation object via EvaluateDerivAdj, extracting the derivative, and deleting the evaluation object. This method is defined in this (the base) class, so it need not be redefined in concrete derived classes.

int CheckDeriv( const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
Check analytic derivative. This method computes the relative difference between the directional derivative as computed from the analytic derivative and the same estimated by a central difference formula. This is done at n equally-spaced points on the line segment [x+hmin*y,x+hmax*y]. The parameters hmin, hmax, and n are optional and default to 0.1, 1.0, and 10, respectively. If the analytic derivative is correctly implemented and the function is sufficiently smooth, then these errors will lie on a parabola when plotted against the step size. The results are sent to the output stream str.

virtual ostream& Write( ostream & str )
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_OpDeriv2Adj_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