HCL_OpDerivAdj_d is the base class for (presumably nonlinear) operators which know how to compute their derivatives as linear operators with adjoints
![]() | 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 |
![]() | DerivAdj ( const HCL_Vector_d & x ) DerivAdj computes the derivative, as a HCL_LinearOpAdj_d, of the operator at x |
![]() | 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 |
![]() | Image ( const HCL_Vector_d & x, HCL_Vector_d & y ) Image computes the action of the operator on x, giving y |
![]() | Write ( ostream & str ) Debugging information |
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:
- Domain Returns a reference to the domain of the operator. This is used primarily for error-checking.
- Range Returns a reference to the range of the operator. This is used primarily for error-checking.
- Image Computes the action of the operator on a vector. Here is an example illustrating the use of Domain, Range, and Image:
void fcn( HCL_Op_d & F,HCL_Vector_d & x,HCL_Vector_d & y ) { if( x.Space() != F.Domain() || y.Space() != F.Range() ) // Error condition . . . F.Image( x,y ); // y <-- F(x) . . . }- DerivAdj Creates the derivative of the operator at a point. This derivative is a linear operator DF(x):X --> Y, and this method constructs it as a HCL_LinearOpAdj_d.
- EvaluateDerivAdj Creates an "evaluation object" which knows the image and derivative of the operator at a given point. The purpose of the evaluation object is to accommodate the common situation in which the computation of the image and derivative involve some common intermediate calculations. The implementor of the operator can put these intermediate calculations in the evaluation object, so that they need only be done once at each point. The implementor of optimization algorithms should respect this by using EvaluateDerivAdj to get the image and/or derivative instead of using Image and/or DerivAdj.
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 void Image( const HCL_Vector_d & x, HCL_Vector_d & y )
virtual HCL_LinearOpAdj_d* DerivAdj( const HCL_Vector_d & x )
int CheckDeriv( const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 )
virtual ostream& Write( ostream & str )
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de