METSlib  0.6
Public Member Functions | List of all members
mets::solution_recorder Class Referenceabstract

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>

Inheritance diagram for mets::solution_recorder:
Inheritance graph
Collaboration diagram for mets::solution_recorder:
Collaboration graph

Public Member Functions

 solution_recorder ()
 Default ctor.
 
 solution_recorder (const solution_recorder &)
 Unimplemented copy ctor.
 
solution_recorderoperator= (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
 

Detailed Description

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).

Member Function Documentation

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.


The documentation for this class was generated from the following file:

Return to METSlib home page