|
Biorithm
1.1
|
A generic class for performing simulated annealing. It is templated by two classes: AnnealState stores information on a "state", e.g., a heavy path or a heavy subgraph, and AnnealMethod a class that takes a state and computes its neighbours. More...
#include <anneal.h>
Public Member Functions | |
| MySimulatedAnnealer (const AnnealState &s) | |
| bool | acceptNeighbour (MyNT score) |
| MyNT | computeBestScore (const vector< AnnealState > &neighbours, AnnealState &bestNeighbour) |
| void | decreaseTemperature () |
| void | getFinalState (AnnealState &finalState) const |
| void | initialise () |
| bool | isDone () |
| Return true if the number of iterations equals the maximum allowed. | |
| void | setNumTotalIterations (unsigned int num) |
| Set the total number of annealing steps to perform. | |
| void | run () |
| Run the simulated annealing algorithm. | |
| void | setInitialState (AnnealState &s) |
| Set the initial state. | |
Protected Attributes | |
| MyNT | _startTemperature |
| MyNT | _endTemperature |
| MyNT | _dropTemperature |
| unsigned int | _numMaxIterations |
| unsigned int | _numMaxIterationsWithoutImprovement |
| MyNT | _bestScore |
| MyNT | _currentTemperature |
| unsigned int | _numTotalIterations |
| unsigned int | _numIterationsWithScoreDecrease |
| unsigned int | _numIterationsWithoutImprovement |
| AnnealState | _startState |
| AnnealState | _currentState |
A generic class for performing simulated annealing. It is templated by two classes: AnnealState stores information on a "state", e.g., a heavy path or a heavy subgraph, and AnnealMethod a class that takes a state and computes its neighbours.
| void MySimulatedAnnealer< AnnealState >::run | ( | ) | [inline] |
Run the simulated annealing algorithm.
1.7.6.1