#include <GeneticAlgorithm.h>

Public Member Functions | |
| GeneticAlgorithm (Gene *G, Fitness *F, const unsigned int &PopSize, glotzmath::RandomNumberGenerator *RG) | |
| GeneticAlgorithm (Gene **G, Fitness *F, const unsigned int &PopSize, const unsigned int &TopToKeep, const unsigned int &BottomToDrop, const double &MutationRate, glotzmath::RandomNumberGenerator *RG) | |
| GeneticAlgorithm (Gene **G, Fitness *F, const unsigned int &PopSize, const unsigned int &TopToKeep, const unsigned int &BottomToDrop, glotzmath::RandomNumberGenerator *RG) | |
| GeneticAlgorithm (std::ifstream &Input, Fitness *F, glotzmath::RandomNumberGenerator *RG) | |
| bool | Run (const unsigned int &NumSteps) |
| void | ChangeGene (const unsigned int &Index, Gene *G) |
| double | GetAverageFitness () |
| double | GetBestFitness () |
| unsigned int | GetPopSize () const |
| Gene * | GetCopyOfGeneAtLocation (const unsigned int &Loc) const |
| void | PrintGenes () |
| void | PrintGenes_Divisible () |
| void | EvaluateAllFitness_External (GeneticAlgorithm *RHS, const bool &StepTaken) |
| virtual bool | EvaluateAllFitness (Gene **G, double *FA, const unsigned int PS) |
| Gene * | GetGene () const |
| void | SaveGAToFile (std::ofstream &Output) const |
| ~GeneticAlgorithm () | |
Protected Member Functions | |
| void | StochasticUniversalSampling () |
| void | TruncationSelection () |
| void | MakeFitnessNeedUpdating () |
| void | TakeStep () |
| bool | DoesFitnessNeedUpdating () const |
Private Member Functions | |
| void | Breeding (const unsigned int &TopSkipped, const unsigned int &MaxSelected, Gene **TempGenesArray) |
| void | Mutation (Gene **TempGenesArray) |
| double | CalcMutationRate (const unsigned int &PopSize, const unsigned int &EffectiveLength) |
| void | EvaluateAllFitness () |
| void | SelectionSort (unsigned int SortedList[]) |
Private Attributes | |
| RandomNumberGenerator * | MyRandGen |
| unsigned int | MyTopToKeep |
| unsigned int | MyBottomToDrop |
| double | MyMutationRate |
| unsigned int | CurrentStep |
| unsigned int | MyPopSize |
| double * | FitnessArray |
| Gene ** | MyGenesArray |
| Gene * | MyGene |
| Fitness * | MyFitness |
| bool | FitnessNeedsMeasuring |
| GeneticAlgorithm::GeneticAlgorithm | ( | Gene * | G, | |
| Fitness * | F, | |||
| const unsigned int & | PopSize, | |||
| glotzmath::RandomNumberGenerator * | RG | |||
| ) |
| GeneticAlgorithm::GeneticAlgorithm | ( | Gene ** | G, | |
| Fitness * | F, | |||
| const unsigned int & | PopSize, | |||
| const unsigned int & | TopToKeep, | |||
| const unsigned int & | BottomToDrop, | |||
| const double & | MutationRate, | |||
| glotzmath::RandomNumberGenerator * | RG | |||
| ) |
| GeneticAlgorithm::GeneticAlgorithm | ( | Gene ** | G, | |
| Fitness * | F, | |||
| const unsigned int & | PopSize, | |||
| const unsigned int & | TopToKeep, | |||
| const unsigned int & | BottomToDrop, | |||
| glotzmath::RandomNumberGenerator * | RG | |||
| ) |
| GeneticAlgorithm::GeneticAlgorithm | ( | std::ifstream & | Input, | |
| Fitness * | F, | |||
| glotzmath::RandomNumberGenerator * | RG | |||
| ) |
| GeneticAlgorithm::~GeneticAlgorithm | ( | ) |
| bool GeneticAlgorithm::Run | ( | const unsigned int & | NumSteps | ) |
Reimplemented in GeneticAlgorithm_MPI.
| void GeneticAlgorithm::ChangeGene | ( | const unsigned int & | Index, | |
| Gene * | G | |||
| ) |
| double GeneticAlgorithm::GetAverageFitness | ( | ) |
Reimplemented in GeneticAlgorithm_MPI.
| double GeneticAlgorithm::GetBestFitness | ( | ) |
Reimplemented in GeneticAlgorithm_MPI.
| unsigned int GeneticAlgorithm::GetPopSize | ( | ) | const |
| Gene * GeneticAlgorithm::GetCopyOfGeneAtLocation | ( | const unsigned int & | Loc | ) | const |
| void GeneticAlgorithm::PrintGenes | ( | ) |
Reimplemented in GeneticAlgorithm_MPI.
| void GeneticAlgorithm::PrintGenes_Divisible | ( | ) |
Reimplemented in GeneticAlgorithm_MPI.
| void GeneticAlgorithm::EvaluateAllFitness_External | ( | GeneticAlgorithm * | RHS, | |
| const bool & | StepTaken | |||
| ) |
| bool GeneticAlgorithm::EvaluateAllFitness | ( | Gene ** | G, | |
| double * | FA, | |||
| const unsigned int | PS | |||
| ) | [virtual] |
Reimplemented in GeneticAlgorithm_MPI.
| Gene * GeneticAlgorithm::GetGene | ( | ) | const |
| void GeneticAlgorithm::SaveGAToFile | ( | std::ofstream & | Output | ) | const |
Reimplemented in GeneticAlgorithm_MPI.
| void GeneticAlgorithm::StochasticUniversalSampling | ( | ) | [protected] |
| void GeneticAlgorithm::TruncationSelection | ( | ) | [protected] |
| void GeneticAlgorithm::MakeFitnessNeedUpdating | ( | ) | [protected] |
| void GeneticAlgorithm::TakeStep | ( | ) | [protected] |
| bool GeneticAlgorithm::DoesFitnessNeedUpdating | ( | ) | const [protected] |
| void GeneticAlgorithm::Breeding | ( | const unsigned int & | TopSkipped, | |
| const unsigned int & | MaxSelected, | |||
| Gene ** | TempGenesArray | |||
| ) | [private] |
| void GeneticAlgorithm::Mutation | ( | Gene ** | TempGenesArray | ) | [private] |
| double GeneticAlgorithm::CalcMutationRate | ( | const unsigned int & | PopSize, | |
| const unsigned int & | EffectiveLength | |||
| ) | [private] |
| void GeneticAlgorithm::EvaluateAllFitness | ( | ) | [private] |
| void GeneticAlgorithm::SelectionSort | ( | unsigned int | SortedList[] | ) | [private] |
RandomNumberGenerator* GeneticAlgorithm::MyRandGen [private] |
unsigned int GeneticAlgorithm::MyTopToKeep [private] |
unsigned int GeneticAlgorithm::MyBottomToDrop [private] |
double GeneticAlgorithm::MyMutationRate [private] |
unsigned int GeneticAlgorithm::CurrentStep [private] |
unsigned int GeneticAlgorithm::MyPopSize [private] |
double* GeneticAlgorithm::FitnessArray [private] |
Gene** GeneticAlgorithm::MyGenesArray [private] |
Gene* GeneticAlgorithm::MyGene [private] |
Fitness* GeneticAlgorithm::MyFitness [private] |
Reimplemented in GeneticAlgorithm_MPI.
bool GeneticAlgorithm::FitnessNeedsMeasuring [private] |
1.5.3