GPLIB++
|
This is a relatively simple selection scheme for the genetic algorithms. More...
#include <SimpleSelect.h>
Public Member Functions | |
SimpleSelect (GeneralRNG &LocalRandom, tProbabilityFunction myPF) | |
The constructor needs a random number generator and a function that returns probabilities. More... | |
virtual | ~SimpleSelect () |
Public Member Functions inherited from gplib::GeneralSelect | |
void | Init () |
size_t | GetOne () |
GeneralSelect () | |
virtual | ~GeneralSelect () |
This is a relatively simple selection scheme for the genetic algorithms.
This class implements a relatively simple, but efficient selection scheme. Each member is assigned the expected count from the probabilities returned by the Probability function rounded to full integers. The difference between the assigned count and the expected count without rounding is used as a probability to have an additional member in the new population.
Definition at line 19 of file SimpleSelect.h.
gplib::SimpleSelect::SimpleSelect | ( | GeneralRNG & | LocalRandom, |
tProbabilityFunction | myPF | ||
) |
The constructor needs a random number generator and a function that returns probabilities.
The constructor takes two parameters
LocalRandom | A random number generator based on GeneralRNG |
myPF | A pointer to a function that returns a vector with probabilities for each population member |
Definition at line 8 of file SimpleSelect.cpp.
|
virtual |
Definition at line 15 of file SimpleSelect.cpp.