HCL_FunctionalHess_d is the base class for all real-valued functions which can compute their gradients and Hessians
![]() | CheckHess ( const HCL_Vector_d &, const HCL_Vector_d &, ostream & str, int n=10, double hmin=0.1, double hmax=1.0 ) Check analytic Hessian |
![]() | Domain () Domain space access |
![]() | EvaluateHess ( const HCL_Vector_d & x ) EvaluateHess creates an "evaluation" object, which knows how to compute the function value, gradient,and Hessian at the given x |
![]() | Gradient ( const HCL_Vector_d & x, HCL_Vector_d & g ) Gradient computes the gradient at x |
![]() | Hessian ( const HCL_Vector_d & x ) Hessian computes the gradient at x |
![]() | Value ( const HCL_Vector_d & x ) Value evaluates the function at x |
![]() | Write ( ostream & str ) Debugging information |
HCL_FunctionalHess_d is the base class for all real-valued functions which can compute their gradients and Hessians. The primary purpose of this class is to represent objective functions in optimization problems. Since this class provides first and second derivative information, an object of this type would typically be used with an algorithm of type HCL_UMinHess_d.The primary methods of this class are
- Domain Returns a reference to the domain of the functional, which is a vector space. This is used primarily for error-checking; for example:
if( x.Space() != f.Domain() ) // Error condition- Value Returns the value of the functional at a point. Example:
double fx = f.Value( x );- Gradient Computes the gradient of the functional at a point. Example:
HCL_Vector_d * g = f.Domain().Member(); // Get a vector to hold the gradient f.Gradient( x,*g ); // Fill *g with the gradient of f at x- Hessian Computes the Hessian of the functional at a point. Example:
HCL_LinearOp_d * L = f.Hessian( x ); // Get the Hessian operator at x.- EvaluateHess Returns an "evaluation object", that is, an object of class HCL_EvaluateFunctional_d, which knows the value, gradient, and Hessian of the functional at given point. Typically, this method will be used to compute the value, gradient, and/or Hessian of the functional, rather than Value, Gradient, and/or Hessian.
In order to define a derived class, one must first define a corresponding HCL_EvaluateFunctionalHess_d class. Defining objective functions is expected to be one of the main activities of users of HCL, since the objective function provides the point of contact between the application software and HCL's optimization code. Please see one of the test programs that comes in the HCLtest directory for examples.
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