class HCL_Functional_d : public HCL_Base

HCL_Functional_d is the base class for all real-valued functions

Inheritance:


Public Methods

virtual HCL_VectorSpace_d& Domain ()
Domain space access
virtual double MaxStep ( const HCL_Vector_d & x, const HCL_Vector_d &dir)
MaxStep computes the longest vector from x in the direction dir that will lie in the domain of definition of the functional, i
void Scan ( const HCL_Vector_d & x, const HCL_Vector_d & dx, int N, double hmin, double hmax, char * fname = NULL )
Scan computes the value of the function at N points
virtual double Value ( const HCL_Vector_d & x )
Value evaluates the function at x
virtual ostream& Write ( ostream & str )
Debugging information

Inherited from HCL_Base:

Public Methods

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

Private Fields

int ReferenceCount

Documentation

HCL_Functional_d is the base class for all real-valued functions. The primary purpose of this class is to represent objective functions in optimization problems. Since this class provides no derivative information, an object of this type would typically be used in a derivative-free algorithm.

The primary methods of this class are

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.

virtual HCL_VectorSpace_d& Domain()
Domain space access. Returns a reference to the HCL_VectorSpace_d which forms the domain of the functional. Note that, in the current design, the domain of a functional must be an entire vector space, although many nonlinear functionals are only defined on an open subset of a vector space. This is a flaw in the design of HCL which may be corrected in some future version of the software. A partial work-around to this problem is provided by the MaxStep method.

virtual double Value( const HCL_Vector_d & x )
Value evaluates the function at x

virtual double MaxStep( const HCL_Vector_d & x, const HCL_Vector_d &dir)
MaxStep computes the longest vector from x in the direction dir that will lie in the domain of definition of the functional, i.e. it computes the greatest a such that x + a*dir lies in the domain. By default (i.e. unless this virtual function is implemented in a derived class), the domain is assumed to be the whole space, and MaxStep return Inf. This method is used in some of the optimization algorithms and provides a partial solution to the problem that many functionals are not defined on an entire vector space, but rather only on a subset.

void Scan( const HCL_Vector_d & x, const HCL_Vector_d & dx, int N, double hmin, double hmax, char * fname = NULL )
Scan computes the value of the function at N points. The points are equally spaced and lie on the line segment from x+hmin*dx to x+hmax*dx. The results are written to the file fname and to the screen.

virtual ostream& Write( ostream & str )
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_DiagFunctional_d
HCL_FunctionalGrad_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