ECF 1.5
AlgRouletteWheel.h
1#ifndef Roulette_Wheel_h
2#define Roulette_Wheel_h
3
4#include "Algorithm.h"
5#include "SelRandomOp.h"
6#include "SelBestOp.h"
7#include "SelFitnessProportionalOp.h"
8
32{
33public:
35 bool advanceGeneration(StateP state, DemeP deme);
36 bool initialize(StateP state);
37 void registerParameters(StateP state);
38
39protected:
40 double crxRate_;
41 double selPressure_;
42 SelFitnessProportionalOpP selFitPropOp;
43 SelRandomOpP selRandomOp;
44 SelBestOpP selBestOp;
45
46};
47typedef boost::shared_ptr<RouletteWheel> RouletteWheelP;
48
49#endif // Roulette_Wheel_h
Algorithm base class.
Definition: Algorithm.h:20
Generational algorithm with roulette wheel selection operator.
bool initialize(StateP state)
Initialize the algorithm, read parameters from the system, do a sanity check.
void registerParameters(StateP state)
Register algorithm's parameters (if any).
bool advanceGeneration(StateP state, DemeP deme)
Perform a single generation on a single deme.
double crxRate_
crossover rate
double selPressure_
selection pressure