This API is currently available in C++ and Python.
The OEFunc0 is an abstract base class. This class defines the interface for functions which take a set of variables and compute a function value, but have no defined analytical gradients. Classes derived from OEFunc0 are intended for use with optimizers which do not require gradients.
- The OEFunc0 class defines the following public methods:
- The following classes derive from this class:
double operator()(const double*)
This method defines the interface for function evaluation. An array of variables is passed as an argument, and a function value is returned. All classes derived from OEFunc0 implements this method.
OESystem::OEIterBase<OEFComponent> *GetFComponents(const double *)
This method defines the interface for retrieving information about function names and associated function values, given a set of variables. The method takes an array of variables, and returns an iterator over the names and component values (typically energies).
All OE classes derived from OEFunc0, implements this method. However, due to the unique construct of the return value from this method, it is not possible to implement this in a user derived class. It is suggested to return a NULL for user derived classes and handle things accordingly.