This class represents an "evaluation" object that will be created by an HCL_Op_d object to represent the image and derivatives of the operator at a point
![]() | Domain () const Domain returns a reference to the domain of the underlying operator |
![]() | Range () const Range returns a reference to the range of the underlying operator |
![]() | Image ( HCL_Vector_d & y ) const Image computes the image of the operator and assigns it to y |
![]() | ImageAdd ( HCL_Vector_d & y, double a=1.0, double b=1.0 ) const ImageAdd computes ![]() |
![]() | ImageAdd ( const HCL_Vector_d & z, HCL_Vector_d & y, double a=1.0, double b=1.0 ) const ImageAdd computes ![]() |
![]() | ImageRef () const ImageRef returns a reference to the image of the operator at this point |
![]() | Deriv () const Deriv computes the derivative of the operator |
![]() | DerivRef () const DerivRef returns a reference to the derivative at this point |
![]() | SecondDeriv () const SecondDeriv computes the second derivative of the operator |
![]() | SecondDerivRef () const SecondDerivRef returns a reference to the second derivative at this point |
![]() | DerivImage ( const HCL_Vector_d & dx, HCL_Vector_d & dy ) const DerivImage computes the image of the derivative on dx, yielding dy |
![]() | DerivAdjImage ( const HCL_Vector_d & dy, HCL_Vector_d & dx ) const DerivAdjImage computes the image of the adjoint of the derivative on dy, yielding dx |
![]() | DerivInvImage ( const HCL_Vector_d & dy, HCL_Vector_d & dx ) const DerivInvImage computes the image of the inverse of the derivative on dy, yielding dx |
![]() | DerivInvAdjImage ( const HCL_Vector_d & dx, HCL_Vector_d & dy ) const DerivInvAdjImage computes the image of the inverse of the adjoint of the derivative on dx, yielding dy |
![]() | SecondDerivImage ( const HCL_Vector_d & dx1, const HCL_Vector_d & dx2, HCL_Vector_d & dy ) const SecondDerivImage computes the image of the second derivative on dx1 and dx2, yielding dy |
![]() | SecondDerivPartialAdjImage (const HCL_Vector_d & dx1, const HCL_Vector_d & dy, HCL_Vector_d & dx2 ) const SecondDerivPartialAdjImage computes the image of the so-called "partial adjoint" of the second derivative (which is a bilinear operator) on dx1 and dy, yielding dx2 |
This class represents an "evaluation" object that will be created by an HCL_Op_d object to represent the image and derivatives of the operator at a point. Thus, ifis a nonlinear operator and
is a vector in the domain, then the evaluation object represents the triple
The purpose of having an evaluation object is to deal with the common situation in which the operator image and derivatives share some intermediate calculations. A typical implementation of such an operator involves defining an evaluation object whose constructor performs these intermediate calculations. The Image method then completes the computation of the operator image, while the Deriv and SecondDeriv methods complete the calculation of the derivatives.
The operator image and derivatives should then be accessed through the ImageRef, DerivRef, and SecondDerivRef methods. These are methods implemented in the base class (i.e. they do not need to be redefined in a derived class). The ImageRef method invokes Image to get the image and returns a reference to it. On subsequent calls, ImageRef merely references the stored value. The other "reference" methods work in a similar fashion.
Here is a summary of the primary methods of this class:
- Domain Returns a reference to the domain of the underlying operator.
- Range Returns a reference to the range of the underlying operator.
- Image Computes the image of the operator at the point at which this object was created. Must be implemented by the creator of a concrete class.
- ImageRef Calls Image, if necessary, to compute the operator image, saves it, and returns it. Implemented in the base class.
- ImageAdd Adds the image of the operator to the output (as opposed to Image, which overwrites the output with the image).
- Deriv Computes the derivative of the operator, at the point at which this object was created, as an HCL_LinearOp_d. Must be implemented by the creator of a concrete class.
- DerivRef Calls Deriv, if necessary, to compute the derivatives, saves it, and returns a reference to it. Implemented in the base class.
- SecondDeriv Computes the second derivative of the operator, at the point at which this object was created, as a HCL_BiLinearOp_d. Must be implemented by the creator of a concrete class.
- SecondDerivRef Calls SecondDeriv, if necessary, to compute the second derivative, saves it, and returns a reference to it. Implemented in the base class.
In addition to the above methods, HCL_EvaluateOp_d has a number of protected virtual functions that allow the user to avoid writing distinct derivative classes if desired. If these methods, which include DerivImage, SecondDerivImage, and others, are over-ridden in a derived class, then the default Deriv and SecondDeriv methods can be used, which create instances of HCL_OpDefaultDeriv_d and HCL_OpDefaultSecondDeriv_d.
See the following report for more details and concrete examples.
"Implementing operators in HCL", Technical Report 99-22, Department of Computational and Applied Mathematics, Rice University, Houston, TX 77251-1892.
downloadable from the HCL home page.
virtual void DerivAdjImage( const HCL_Vector_d & dy, HCL_Vector_d & dx ) const
virtual void DerivInvImage( const HCL_Vector_d & dy, HCL_Vector_d & dx ) const
virtual void DerivInvAdjImage( const HCL_Vector_d & dx, HCL_Vector_d & dy ) const
virtual void SecondDerivImage( const HCL_Vector_d & dx1, const HCL_Vector_d & dx2, HCL_Vector_d & dy ) const
virtual void SecondDerivPartialAdjImage(const HCL_Vector_d & dx1, const HCL_Vector_d & dy, HCL_Vector_d & dx2 ) const
virtual HCL_VectorSpace_d& Domain() const
virtual HCL_VectorSpace_d& Range() const
virtual void Image( HCL_Vector_d & y ) const
virtual void ImageAdd( HCL_Vector_d & y, double a=1.0, double b=1.0 ) const
. This method
is given a default implementation in the base class, and need not
be re-implemented in a derived class unless it is desired to
obtain the gain in efficiency from "loop-fusion". Note that the
scalars a and b are optional and default to 1.0.
virtual void ImageAdd( const HCL_Vector_d & z, HCL_Vector_d & y, double a=1.0, double b=1.0 ) const
. This method
is given a default implementation in the base class, and need not
be re-implemented in a derived class unless it is desired to
obtain the gain in efficiency from "loop-fusion". Note that the
scalars a and b are optional and default to 1.0.
virtual const HCL_Vector_d& ImageRef() const
virtual HCL_LinearOp_d* Deriv() const
virtual const HCL_LinearOp_d& DerivRef() const
virtual HCL_BiLinearOp_d* SecondDeriv() const
virtual const HCL_BiLinearOp_d& SecondDerivRef() const
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