GPLIB++
|
This is the standard propagation class that generates a new population from the old one. More...
#include <StandardPropagation.h>
Public Member Functions | |
virtual void | NextGeneration () |
StandardPropagation (GeneralSelect *const LocalSelect, GeneralPopulation *const LocalPopulation, GeneralRNG *const LocalRandom) | |
The constructor takes pointers to various base classes that configure the behaviour of the selection process. More... | |
virtual | ~StandardPropagation () |
Public Member Functions inherited from gplib::GeneralPropagation | |
void | SetParams (const double mutation, const double crossover) |
GeneralPropagation (GeneralSelect *const LocalSelect, GeneralPopulation *const LocalPopulation, GeneralRNG *const LocalRandom) | |
virtual | ~GeneralPropagation () |
GeneralPropagation (GeneralPropagation &Old) | |
Additional Inherited Members | |
Protected Member Functions inherited from gplib::GeneralPropagation | |
virtual void | Crossover (tpopmember &father, tpopmember &mother) |
virtual void | Mutation (tpopmember &child) |
Protected Attributes inherited from gplib::GeneralPropagation | |
GeneralSelect *const | Select |
GeneralPopulation *const | Population |
GeneralRNG *const | Random |
double | MutationProb |
double | CrossoverProb |
This is the standard propagation class that generates a new population from the old one.
This class implements the standard propagation schemes for genetic algorithms, selection, crossover and mutation. Each of these steps is performed by a class that we can choose in the constructor.
Definition at line 15 of file StandardPropagation.h.
gplib::StandardPropagation::StandardPropagation | ( | GeneralSelect *const | LocalSelect, |
GeneralPopulation *const | LocalPopulation, | ||
GeneralRNG *const | LocalRandom | ||
) |
The constructor takes pointers to various base classes that configure the behaviour of the selection process.
This class is basically just a skeleton that uses the objects that implement Selection, Crossover and Mutation in the right order.
LocalSelect | A pointer to an object that implements a selection scheme for the genetic algorithm |
LocalPopulation | A pointer to a population object |
LocalRandom | A pointer to a random number generator |
Definition at line 11 of file StandardPropagation.cpp.
|
virtual |
Definition at line 17 of file StandardPropagation.cpp.
|
virtual |
Implements gplib::GeneralPropagation.
Definition at line 21 of file StandardPropagation.cpp.
References gplib::GeneralPropagation::Crossover(), gplib::GeneralSelect::GetOne(), gplib::GeneralPopulation::GetPopulation(), gplib::GeneralSelect::Init(), gplib::GeneralPropagation::Mutation(), gplib::GeneralPropagation::Population, gplib::GeneralPropagation::Select, and gplib::GeneralPopulation::SetPopulation().