#include <GeneralPropagation.h>

Public Member Functions | |
| virtual void | NextGeneration ()=0 |
| void | SetParams (const double mutation, const double crossover) |
| GeneralPropagation (GeneralSelect *const LocalSelect, GeneralPopulation *const LocalPopulation, GeneralRNG *const LocalRandom) | |
| virtual | ~GeneralPropagation () |
| GeneralPropagation (GeneralPropagation &Old) | |
Protected Member Functions | |
| virtual void | Crossover (tpopmember &father, tpopmember &mother) |
| virtual void | Mutation (tpopmember &child) |
Protected Attributes | |
| GeneralSelect *const | Select |
| GeneralPopulation *const | Population |
| GeneralRNG *const | Random |
| double | MutationProb |
| double | CrossoverProb |
This class defines the common functionality that is necessary to generate a new population from the current generation. The implementation details depend on the type of GA and Population encoding and those classes have to match to do anything useful.
Definition at line 16 of file GeneralPropagation.h.
| GeneralPropagation::GeneralPropagation | ( | GeneralSelect *const | LocalSelect, | |
| GeneralPopulation *const | LocalPopulation, | |||
| GeneralRNG *const | LocalRandom | |||
| ) |
| GeneralPropagation::~GeneralPropagation | ( | ) | [virtual] |
Definition at line 21 of file GeneralPropagation.cpp.
| GeneralPropagation::GeneralPropagation | ( | GeneralPropagation & | Old | ) |
| void GeneralPropagation::Crossover | ( | tpopmember & | father, | |
| tpopmember & | mother | |||
| ) | [protected, virtual] |
Definition at line 26 of file GeneralPropagation.cpp.
References CrossoverProb, GeneralRNG::GetNumber(), and Random.
Referenced by StandardPropagation::NextGeneration().
| void GeneralPropagation::Mutation | ( | tpopmember & | child | ) | [protected, virtual] |
Definition at line 38 of file GeneralPropagation.cpp.
References GeneralRNG::GetNumber(), MutationProb, and Random.
Referenced by StandardPropagation::NextGeneration().
| virtual void GeneralPropagation::NextGeneration | ( | ) | [pure virtual] |
| void GeneralPropagation::SetParams | ( | const double | mutation, | |
| const double | crossover | |||
| ) | [inline] |
Definition at line 27 of file GeneralPropagation.h.
References CrossoverProb, and MutationProb.
Referenced by main().
GeneralSelect* const GeneralPropagation::Select [protected] |
Definition at line 20 of file GeneralPropagation.h.
Referenced by StandardPropagation::NextGeneration().
GeneralPopulation* const GeneralPropagation::Population [protected] |
Definition at line 21 of file GeneralPropagation.h.
Referenced by StandardPropagation::NextGeneration().
GeneralRNG* const GeneralPropagation::Random [protected] |
double GeneralPropagation::MutationProb [protected] |
Definition at line 23 of file GeneralPropagation.h.
Referenced by GeneralPropagation(), Mutation(), and SetParams().
double GeneralPropagation::CrossoverProb [protected] |
Definition at line 24 of file GeneralPropagation.h.
Referenced by Crossover(), GeneralPropagation(), and SetParams().
1.5.5