class HCL_EvalOpProductDomain_d : public HCL_EvaluateOp_d

This class represents an "evaluation" object that will be created by an HCL_OpProductDomain_d object to implement the image and derivatives of the operator at a point

Inheritance:


Public Methods

virtual HCL_VectorSpace_d& Domain () const
Domain returns a reference to the domain of the underlying operator
HCL_ProductSpace_d& ProductDomain () const
ProductDomain returns a reference to the domain as a product vector space
virtual HCL_VectorSpace_d& Range () const
Range returns a reference to the range of the underlying operator.
virtual void Image ( HCL_Vector_d & y ) const
Image computes the image of the operator and assigns the result to y
virtual HCL_LinearOp_d* Deriv () const
Deriv computes the derivative of the operator
virtual const HCL_LinearOp_d& DerivRef () const
DerivRef returns a reference to the derivative at this point
virtual HCL_LinearOp_d* PartialDeriv ( int i ) const
PartialDeriv computes the partial derivative, with respect to the ith variable, as a linear operator
virtual const HCL_LinearOp_d& PartialDerivRef ( int i ) const
PartialDerivRef returns a reference to the partial derivative with respect to the ith variable
virtual HCL_BiLinearOp_d* SecondDeriv () const
SecondDeriv computes the second derivative of the operator
virtual const HCL_BiLinearOp_d& SecondDerivRef () const
SecondDerivRef returns a reference to the second derivative at this point
virtual HCL_BiLinearOp_d* SecondPartialDeriv ( int i, int j ) const
SecondPartialDeriv computes the second partial derivative, with respect to the ith and jth variables, as a bilinear operator
virtual const HCL_BiLinearOp_d& SecondPartialDerivRef ( int i, int j ) const
SecondPartialDerivRef returns a reference to the second partial derivative, with respect to the ith and jth variables
virtual ostream& Write ( ostream & str ) const
Debugging information

Protected Methods

virtual void PartialDerivImage ( int i, const HCL_Vector_d & dx, HCL_Vector_d & dy ) const
PartialDerivImage computes the image of the derivative on dx, yielding dy
virtual void PartialDerivAdjImage ( int i, const HCL_Vector_d & dy, HCL_Vector_d & dx ) const
PartialDerivAdjImage computes the image of the adjoint of the derivative on dy, yielding dx
virtual void PartialDerivInvImage ( int i, const HCL_Vector_d & dy, HCL_Vector_d & dx ) const
PartialDerivInvImage computes the image of the inverse of the derivative on dy, yielding dx
virtual void PartialDerivInvAdjImage ( int i, const HCL_Vector_d & dx, HCL_Vector_d & dy ) const
PartialDerivInvAdjImage computes the image of the inverse of the adjoint of the derivative on dx, yielding dy
virtual void SecondPartialDerivImage ( int i, int j, const HCL_Vector_d & dxj, const HCL_Vector_d & dxi, HCL_Vector_d & dy ) const
This method computes
virtual void SecondPartialDerivPartialAdjImage ( int i, int j, int flag, const HCL_Vector_d & dxij, const HCL_Vector_d & dy, HCL_Vector_d & dxji ) const
This method computes (flag==1) or (flag==2)

Inherited from HCL_EvaluateOp_d:

Public Methods

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

Protected Methods

virtual void DerivImage( const HCL_Vector_d & dx, HCL_Vector_d & dy ) const
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

Inherited from HCL_Base:

Public Methods

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

Documentation

This class represents an "evaluation" object that will be created by an HCL_OpProductDomain_d object to implement the image and derivatives of the operator at a point. (The term "ProductDomain" refers to the fact that the operator in question is defined on a product space). Thus, if is 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 PartialDeriv and SecondPartialDeriv methods complete the calculation of the derivatives.

The difference between HCL_EvaluateOp_d and HCL_EvalOpProductDomain_d is that the partial derivatives of the operator are available in the second case. Also, from the point of view of the implementor of the class, only the partial derivatives need be implemented; the class puts them together into the full derivative.

The operator image and derivatives should then be accessed through the ImageRef, DerivRef (or PartialDerivRef), and SecondDerivRef (or SecondPartialDerivRef) 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:

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 PartialDerivImage, SecondPartialDerivImage, and others, are over-ridden in a derived class, then the default PartialDeriv and SecondPartialDeriv methods can be used, which create instances of HCL_OpDefaultPartialDeriv_d and HCL_OpDefaultSecondPartialDeriv_d.

The following report describes the implementation of operators in detail:

"Implementing operators in HCL", Technical Report 99-22, Department of Computational and Applied Mathematics, Rice University, Houston, TX 77251-1892.

A forthcoming report, "Implementing HCL functionals and operators on product spaces", will provide similar details about implementing operators on product spaces. This report should be available from the same source in early 2000.

virtual void PartialDerivImage( int i, const HCL_Vector_d & dx, HCL_Vector_d & dy ) const
PartialDerivImage computes the image of the derivative on dx, yielding dy. If this method, and the related image methods for the derivative, are implemented, then the default PartialDeriv method can be used; the derivative will then be an instance of HCL_OpDefaultPartialDeriv_d.

virtual void PartialDerivAdjImage( int i, const HCL_Vector_d & dy, HCL_Vector_d & dx ) const
PartialDerivAdjImage computes the image of the adjoint of the derivative on dy, yielding dx. If this method, and the related image methods for the derivative, are implemented, then the default PartialDeriv method can be used; the derivative will then be an instance of HCL_OpDefaultPartialDeriv_d.

virtual void PartialDerivInvImage( int i, const HCL_Vector_d & dy, HCL_Vector_d & dx ) const
PartialDerivInvImage computes the image of the inverse of the derivative on dy, yielding dx. If this method, and the related image methods for the derivative, are implemented, then the default PartialDeriv method can be used; the derivative will then be an instance of HCL_OpDefaultPartialDeriv_d.

virtual void PartialDerivInvAdjImage( int i, const HCL_Vector_d & dx, HCL_Vector_d & dy ) const
PartialDerivInvAdjImage computes the image of the inverse of the adjoint of the derivative on dx, yielding dy. If this method, and the related image methods for the derivative, are implemented, then the default PartialDeriv method can be used; the derivative will then be an instance of HCL_OpDefaultPartialDeriv_d.

virtual void SecondPartialDerivImage( int i, int j, const HCL_Vector_d & dxj, const HCL_Vector_d & dxi, HCL_Vector_d & dy ) const
This method computes . If this method and SecondPartialDerivPartialAdjImage are implemented, then the default SecondPartialDeriv method can be used; the second derivative will then be an instance of HCL_OpDefaultSecondPartialDeriv_d.

virtual void SecondPartialDerivPartialAdjImage( int i, int j, int flag, const HCL_Vector_d & dxij, const HCL_Vector_d & dy, HCL_Vector_d & dxji ) const
This method computes (flag==1) or (flag==2). If this method and SecondPartialDerivImage are implemented, then the default SecondPartialDeriv method can be used; the second derivative will then be an instance of HCL_OpDefaultSecondPartialDeriv_d.

virtual HCL_VectorSpace_d& Domain() const
Domain returns a reference to the domain of the underlying operator

HCL_ProductSpace_d& ProductDomain() const
ProductDomain returns a reference to the domain as a product vector space. It is implemented in the base class and need not be re-implemented in a derived class.

virtual HCL_VectorSpace_d& Range() const
Range returns a reference to the range of the underlying operator.

virtual void Image( HCL_Vector_d & y ) const
Image computes the image of the operator and assigns the result to y

virtual HCL_LinearOp_d* Deriv() const
Deriv computes the derivative of the operator. Note that this method constructs an HCL_LinearOp_d, which the calling program is responsible for deleting with HCL_delete. Deriv is implemented in this (the base) class (using the partial derivatives), so it need not be re-defined in derived classes.

virtual const HCL_LinearOp_d& DerivRef() const
DerivRef returns a reference to the derivative at this point. The programmer has a choice of calling Deriv, in which case the calling routine is responsible for managing the storage, or calling DerivRef, in which case the Evaluation object does. DerivRef is implemented in the base class and need not be re-implemented in a derived class.

virtual HCL_LinearOp_d* PartialDeriv( int i ) const
PartialDeriv computes the partial derivative, with respect to the ith variable, as a linear operator.

virtual const HCL_LinearOp_d& PartialDerivRef( int i ) const
PartialDerivRef returns a reference to the partial derivative with respect to the ith variable. PartialDerivRef is implemented in the base class and need not be re-implemented in a derived class.

virtual HCL_BiLinearOp_d* SecondDeriv() const
SecondDeriv computes the second derivative of the operator. The second derivative is a bilinear operator which knows how to compute all relevant adjoints. SecondDeriv is implemented in the base class and need not be re-implemented in a derived class.

virtual const HCL_BiLinearOp_d& SecondDerivRef() const
SecondDerivRef returns a reference to the second derivative at this point. The programmer has a choice of calling SecondDeriv, in which case the calling routine is responsible for managing the storage, or calling SecondDerivRef, in which case the Evaluation object does. SecondDeriv is implemented in the base class and need not be re-implemented in a derived class.

virtual HCL_BiLinearOp_d* SecondPartialDeriv( int i, int j ) const
SecondPartialDeriv computes the second partial derivative, with respect to the ith and jth variables, as a bilinear operator

virtual const HCL_BiLinearOp_d& SecondPartialDerivRef( int i, int j ) const
SecondPartialDerivRef returns a reference to the second partial derivative, with respect to the ith and jth variables. SecondDeriv is implemented in the base class and need not be re-implemented in a derived class.

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