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 | |
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. | |
virtual gol_type | best_cost () const =0 |
solution_recorder & | operator= (const solution_recorder &) |
Unimplemented assignment operator. | |
solution_recorder () | |
Default ctor. | |
solution_recorder (const solution_recorder &) | |
Unimplemented copy ctor. | |
virtual | ~solution_recorder () |
A virtual dtor. |
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).
Definition at line 51 of file abstract-search.hh.
mets::solution_recorder::solution_recorder | ( | ) | [inline] |
Default ctor.
Definition at line 54 of file abstract-search.hh.
Unimplemented copy ctor.
mets::solution_recorder::~solution_recorder | ( | ) | [inline, virtual] |
A virtual dtor.
Definition at line 339 of file abstract-search.hh.
virtual bool mets::solution_recorder::accept | ( | const feasible_solution & | sol | ) | [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.
virtual gol_type mets::solution_recorder::best_cost | ( | ) | const [pure virtual] |
Implemented in mets::best_ever_solution.
solution_recorder& mets::solution_recorder::operator= | ( | const solution_recorder & | ) |
Unimplemented assignment operator.