METSlib  0.6
Public Member Functions | Protected Attributes | List of all members
mets::iteration_termination_criteria Class Reference

Termination criteria based on the number of iterations. More...

#include <termination-criteria.hh>

Inheritance diagram for mets::iteration_termination_criteria:
Inheritance graph
Collaboration diagram for mets::iteration_termination_criteria:
Collaboration graph

Public Member Functions

 iteration_termination_criteria (int max)
 Ctor. Max is the number of iterations to do.
 
 iteration_termination_criteria (termination_criteria_chain *next, int max)
 
bool operator() (const feasible_solution &fs)
 Alternate function that decides if we shoud terminate the search process. More...
 
void reset ()
 Reset the criterion to its initial state. More...
 
- Public Member Functions inherited from mets::termination_criteria_chain
 termination_criteria_chain (termination_criteria_chain *next=0)
 Constructor. More...
 
 termination_criteria_chain (const termination_criteria_chain &)
 purposely not implemented (see Effective C++)
 
termination_criteria_chainoperator= (const termination_criteria_chain &)
 
virtual ~termination_criteria_chain ()
 Virtual destructor.
 

Protected Attributes

int max_m
 
int iterations_m
 
- Protected Attributes inherited from mets::termination_criteria_chain
termination_criteria_chainnext_m
 

Detailed Description

Termination criteria based on the number of iterations.

This termination criteria terminates the tabu-search after a fixed number of itarations.

Member Function Documentation

bool mets::iteration_termination_criteria::operator() ( const feasible_solution fs)
inlinevirtual

Alternate function that decides if we shoud terminate the search process.

(chain of responsibility)

Parameters
fsThe current working solution.
Returns
True if we shoud terminate

Reimplemented from mets::termination_criteria_chain.

void mets::iteration_termination_criteria::reset ( )
inlinevirtual

Reset the criterion to its initial state.

(chain of responsibility)

Reimplemented from mets::termination_criteria_chain.


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

Return to METSlib home page