METSlib
0.6
|
The solution recorder is used by search algorithm, at the end of each iteration, to record the best seen solution. More...
#include <abstract-search.hh>
Public Member Functions | |
solution_recorder () | |
Default ctor. | |
solution_recorder (const solution_recorder &) | |
Unimplemented copy ctor. | |
solution_recorder & | operator= (const solution_recorder &) |
Unimplemented assignment operator. | |
virtual | ~solution_recorder () |
A virtual dtor. | |
virtual bool | accept (const feasible_solution &sol)=0 |
Accept is called at the end of each iteration for an opportunity to record the best move ever. More... | |
virtual gol_type | best_cost () const =0 |
The solution recorder is used by search algorithm, at the end of each iteration, to record the best seen solution.
The concept of best is externalized so that you can record the best ever solution met or the best solution that matches some other criteria (e.g. feasibility constraints relaxed in the feasible_solution implementation of the cost function).
|
pure virtual |
Accept is called at the end of each iteration for an opportunity to record the best move ever.
(this is a chain of responsibility)
Implemented in mets::best_ever_solution.
Return to METSlib home page