HxCallback Interface¶
-
class HxCallback¶
HxCallback interface. Implementing the HxCallback interface enables users to call functions to react to specific events or to call a function regularly during the search. It can be used for example to control when to stop the search or to display some specific information during the search.
Note 1: When a callback is called, the optimizer is paused. In that state, you can call all the methods marked as “allowed in state
S_Paused
. Calling any other method will throw an error.Note 2: Hexaly Optimizer does not manage memory of objects created outside of its environment. Thus, you have to explicitly remove and delete your HxCallback at the end of the search.
Summary¶
The function that will be called during the search. |
|
Default virtual destructor. |
Functions¶
-
virtual void callback(HexalyOptimizer &optimizer, HxCallbackType type) = 0¶
The function that will be called during the search.
- Parameters:
optimizer – The optimizer calling the function.
type – The type of event that triggered the call.
-
virtual HxCallback::~HxCallback()¶
Default virtual destructor.