class HCL_OpProductDomain_d : public HCL_Op_d

HCL_OpProductDomain_d is the base class for (presumably nonlinear) operators

Inheritance:


Public Methods

virtual HCL_VectorSpace_d& Domain () const
Domain space access
virtual HCL_ProductSpace_d& ProductDomain () const
Access to the domain, explicitly as a product vector space
virtual HCL_VectorSpace_d& Range () const
Range space access
virtual HCL_EvaluateOp_d* Evaluate ( const HCL_Vector_d & x ) const
Evaluate creates an evaluation object which knows how to compute the image and the derivative (as a linear operator with adjoint) at a point
virtual HCL_LinearOp_d* PartialDeriv ( int i, const HCL_Vector_d & x ) const
PartialDeriv computes the partial derivative of the operator, with respect to the ith component of the independent variable
virtual HCL_BiLinearOp_d* SecondPartialDeriv ( int i, int j, const HCL_Vector_d & x ) const
SecondPartialDeriv computes the second partial derivative of the operator, with respect to the ith and jth components of the independent variable
int CheckPartialDeriv ( int ind, const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
Check partial derivatives
int CheckPartialDerivAdj ( int ind, const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
CheckPartialDerivAdj calls CheckPartialDeriv to test the correctness of the partial derivative, then calls the HCL_LinearOp_d method CheckAdj to test the correctness of the adjoint
int CheckSecondPartialDeriv ( int i, int j, const HCL_Vector_d & x, const HCL_Vector_d & dxj, const HCL_Vector_d & dxi, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
Check second partial derivatives
int CheckSecondPartialDerivAdj ( int i, int j, const HCL_Vector_d & x, const HCL_Vector_d & dxj, const HCL_Vector_d & dxi, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
CheckSecondPartialDerivAdj calls CheckSecondPartialDeriv to test the correctness of the second partial derivative, then calls the HCL_BiLinearOp_d method CheckAdj to test the correctness of the various adjoints
int CheckSecondPartialDeriv ( int i, const HCL_Vector_d & x, const HCL_Vector_d & dxi, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
This version of CheckSecondPartialDeriv checks the ``pure'' (not mixed) second partial derivative
int CheckSecondPartialDerivAdj ( int i, const HCL_Vector_d & x, const HCL_Vector_d & dxi, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
This version of CheckSecondPartialDerivAdj checks the ``pure'' (not mixed) second partial derivative
virtual ostream& Write ( ostream & str ) const
Debugging information

Protected Methods

virtual void Image1 ( const HCL_Vector_d & x, HCL_Vector_d & y ) const
Image1 computes the image of the operator on x, yielding y
virtual void PartialDerivImage ( int i, const HCL_Vector_d & x, 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 & x, 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 & x, 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 & x, const HCL_Vector_d & dx, HCL_Vector_d & dy ) const
PartialDerivInvAdjImage computes the image of the inverse of the adjoint on dx, yielding dy
virtual HCL_LinearOp_d* PartialDeriv1 ( int i, const HCL_Vector_d & x ) const
PartialDeriv1 computes a partial derivative of the operator
virtual void SecondPartialDerivImage ( int i, int j, const HCL_Vector_d & x, 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 & x, const HCL_Vector_d & dxij, const HCL_Vector_d & dy, HCL_Vector_d & dxji ) const
This method computes (flag==1) or (flag==2)
virtual HCL_BiLinearOp_d* SecondPartialDeriv1 ( int i, int j, const HCL_Vector_d & x ) const
SecondPartialDeriv1 computes a second partial derivative of the operator as a bilinear operator

Inherited from HCL_Op_d:

Public Methods

virtual double MaxStep( const HCL_Vector_d & x, const HCL_Vector_d &dir) const
virtual void Image( const HCL_Vector_d & x, HCL_Vector_d & y ) const
virtual void ImageAdd( const HCL_Vector_d & x, HCL_Vector_d & y, double a=1.0, double b=1.0 ) const
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
virtual HCL_LinearOp_d* Deriv( const HCL_Vector_d & x ) const
virtual HCL_BiLinearOp_d* SecondDeriv( const HCL_Vector_d & x ) const
int CheckDeriv( const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
int CheckDerivAdj( const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
int CheckSecondDeriv( const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
int CheckSecondDerivAdj( const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const

Protected Methods

virtual void DerivImage( const HCL_Vector_d & x, const HCL_Vector_d & dx, HCL_Vector_d & dy ) const
virtual void DerivAdjImage( const HCL_Vector_d & x, const HCL_Vector_d & dy, HCL_Vector_d & dx ) const
virtual void DerivInvImage( const HCL_Vector_d & x, const HCL_Vector_d & dy, HCL_Vector_d & dx ) const
virtual void DerivInvAdjImage( const HCL_Vector_d & x, const HCL_Vector_d & dx, HCL_Vector_d & dy ) const
virtual HCL_LinearOp_d* Deriv1( const HCL_Vector_d & x ) const
virtual void SecondDerivImage( const HCL_Vector_d & x, const HCL_Vector_d & dx1, const HCL_Vector_d & dx2, HCL_Vector_d & dy ) const
virtual void SecondDerivPartialAdjImage(const HCL_Vector_d & x, const HCL_Vector_d & dx1, const HCL_Vector_d & dy, HCL_Vector_d & dx2 ) const
virtual HCL_BiLinearOp_d* SecondDeriv1( const HCL_Vector_d & x ) const

Inherited from HCL_Base:

Public Methods

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

Documentation

HCL_OpProductDomain_d is the base class for (presumably nonlinear) operators. Such an operator maps one vector space into another, say The term "ProductDomain" refers to the fact that the domain is a product space:

The primary methods of this class are:

In addition to the above methods, HCL_OpProductDomain_d has a number of protected virtual functions that allow the user to avoid writing a distinct evaluation class if desired. If these methods, which include Image1, PartialDerivImage, etc. (or PartialDeriv1), SecondPartialDerivImage, etc. (or SecondPartialDeriv1), are over-ridden in a derived class, then the default Evaluate method can be used, which creates an instance of HCL_OpPDDefaultEval_d.

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. As the last paragraph suggests, there are a number of ways to implement operators. These are described in detail in the report

"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 Image1( const HCL_Vector_d & x, HCL_Vector_d & y ) const
Image1 computes the image of the operator on x, yielding y. If this and the related protected methods for derivatives are implemented, then the default implementation of Evaluate can be used. In that case, the evaluation object will be an instance of HCL_OpPDDefaultEval_d.

virtual void PartialDerivImage( int i, const HCL_Vector_d & x, 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 protected methods are implemented, then the default evaluation class can be used; the Evaluate method will then return an instance of HCL_OpPDDefaultEval_d.

virtual void PartialDerivAdjImage( int i, const HCL_Vector_d & x, 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 protected methods are implemented, then the default evaluation class can be used; the Evaluate method will then return an instance of HCL_OpPDDefaultEval_d.

virtual void PartialDerivInvImage( int i, const HCL_Vector_d & x, 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 protected methods are implemented, then the default evaluation class can be used; the Evaluate method will then return an instance of HCL_OpPDDefaultEval_d.

virtual void PartialDerivInvAdjImage( int i, const HCL_Vector_d & x, const HCL_Vector_d & dx, HCL_Vector_d & dy ) const
PartialDerivInvAdjImage computes the image of the inverse of the adjoint on dx, yielding dy. If this method, and the related protected methods are implemented, then the default evaluation class can be used; the Evaluate method will then return an instance of HCL_OpPDDefaultEval_d.

virtual HCL_LinearOp_d* PartialDeriv1( int i, const HCL_Vector_d & x ) const
PartialDeriv1 computes a partial derivative of the operator. Note that only one of PartialDeriv1 and the image methods PartialDerivImage, PartialDerivAdjImage, etc. need be implemented to enable the use of HCL_OpPDDefaultEval_d.

virtual void SecondPartialDerivImage( int i, int j, const HCL_Vector_d & x, 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 in a derived class, then HCL_OpPDDefaultEval_d will be able to compute second partial derivatives.

virtual void SecondPartialDerivPartialAdjImage( int i, int j, int flag, const HCL_Vector_d & x, const HCL_Vector_d & dxij, const HCL_Vector_d & dy, HCL_Vector_d & dxji ) const
This method computes (flag==1) or (flag==2)

virtual HCL_BiLinearOp_d* SecondPartialDeriv1( int i, int j, const HCL_Vector_d & x ) const
SecondPartialDeriv1 computes a second partial derivative of the operator as a bilinear operator. This method can be implemented instead of the pair SecondPartialDerivImage, SecondPartialDerivPartialAdjImage to enable the use of second partial derivatives with HCL_OpPDDefaultEval_d.

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

virtual HCL_ProductSpace_d& ProductDomain() const
Access to the domain, explicitly as a product vector space

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

virtual HCL_EvaluateOp_d* Evaluate( const HCL_Vector_d & x ) const
Evaluate 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 HCL_LinearOp_d* PartialDeriv( int i, const HCL_Vector_d & x ) const
PartialDeriv computes the partial derivative of the operator, with respect to the ith component of the independent variable. It does this by constructing an evaluation object, extracting the partial derivative, and then deleting the evaluation object. PartialDeriv is defined in this (the base) class, and need not be redefined in a derived class.

virtual HCL_BiLinearOp_d* SecondPartialDeriv( int i, int j, const HCL_Vector_d & x ) const
SecondPartialDeriv computes the second partial derivative of the operator, with respect to the ith and jth components of the independent variable. It does this by constructing an evaluation object, extracting the partial derivative, and then deleting the evaluation object. SecondPartialDeriv is defined in this (the base) class, and need not be redefined in a derived class.

int CheckPartialDeriv( int ind, const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
Check partial derivatives. This method computes the relative difference between the directional derivative as computed from the analytic partial 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 partial 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.

int CheckPartialDerivAdj( int ind, const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
CheckPartialDerivAdj calls CheckPartialDeriv to test the correctness of the partial derivative, then calls the HCL_LinearOp_d method CheckAdj to test the correctness of the adjoint

int CheckSecondPartialDeriv( int i, int j, const HCL_Vector_d & x, const HCL_Vector_d & dxj, const HCL_Vector_d & dxi, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
Check second partial derivatives. This method computes the relative difference between the directional derivative as computed from the analytic second partial 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 partial 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. If i==j, only the variable dxi is used.

int CheckSecondPartialDerivAdj( int i, int j, const HCL_Vector_d & x, const HCL_Vector_d & dxj, const HCL_Vector_d & dxi, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
CheckSecondPartialDerivAdj calls CheckSecondPartialDeriv to test the correctness of the second partial derivative, then calls the HCL_BiLinearOp_d method CheckAdj to test the correctness of the various adjoints

int CheckSecondPartialDeriv( int i, const HCL_Vector_d & x, const HCL_Vector_d & dxi, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
This version of CheckSecondPartialDeriv checks the ``pure'' (not mixed) second partial derivative

int CheckSecondPartialDerivAdj( int i, const HCL_Vector_d & x, const HCL_Vector_d & dxi, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) const
This version of CheckSecondPartialDerivAdj checks the ``pure'' (not mixed) second partial derivative

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.


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