SimAnnBase Class Reference
[Experimental]

#include <lemon/simann.h>

Inherited by SimAnn.

Inheritance diagram for SimAnnBase:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void setController (ControllerBase &_controller)
 Sets the controller class to use.
double getCurrCost () const
 Returns the cost of the current solution.
double getPrevCost () const
 Returns the cost of the previous solution.
double getBestCost () const
 Returns the cost of the best solution.
long getIter () const
 Returns the number of iterations done.
long getLastImpr () const
 Returns the ordinal number of the last iteration when the solution was improved.
bool step ()
 Performs one iteration.
bool step (int n)
 Performs a given number of iterations.
void run ()
 Starts the annealing process.
virtual ~SimAnnBase ()
 Destructor.

Protected Member Functions

virtual double mutate ()=0
 Step to a neighbouring state.
virtual void revert ()=0
 Reverts the last mutate().
virtual void saveAsBest ()=0
 Saves the current solution as the best one.
virtual void init ()
 Does initializations before each run.

Private Attributes

ControllerBasecontroller
 Pointer to the controller.
double curr_cost
 Cost of the current solution.
double best_cost
 Cost of the best solution.
double prev_cost
 Cost of the previous solution.
double prev_prev_cost
 Cost of the solution preceding the previous one.
long iter
 Number of iterations.
long last_impr
 Number of iterations which did not improve the solution since the last improvement.

Member Function Documentation

bool step ( int  n  )  [inline]

Parameters:
n the number of iterations


The documentation for this class was generated from the following file:
Generated on Tue Oct 31 09:51:20 2006 for LEMON by  doxygen 1.5.1