Public Member Functions | List of all members
gplib::BinaryPopulation Class Reference

A population that is encoded as a simple binary string. More...

#include <BinaryPopulation.h>

Inheritance diagram for gplib::BinaryPopulation:
Inheritance graph

Public Member Functions

virtual void InitPop ()
 BinaryPopulation (const int popsize, const int genesize, GeneralRNG &LocalRandom, const bool init=false)
virtual ~BinaryPopulation ()
virtual BinaryPopulationoperator= (const BinaryPopulation &source)
- Public Member Functions inherited from gplib::GeneralPopulation
const tpopulationGetOldPopulation () const
void StoreOldPopulation ()
void PrintPopulation (std::ostream &output) const
void ReadPopulation (std::istream &input)
void PrintProbabilities (std::ostream &output) const
void PrintDistances (std::ostream &output) const
const tpopulationGetPopulation () const
const tprobabilityvGetProbabilities () const
const tcrowddistvGetCrowdingDistances () const
void SetPopulation (const tpopulation &LocalPop)
void SetProbabilities (const tprobabilityv &LocalProb)
void SetCrowdingDistances (const tcrowddistv &LocalDist)
int GetPopsize () const
int GetGenesize () const
 GeneralPopulation (const int popsize, const int genesize)
 GeneralPopulation (GeneralPopulation &Old)
 GeneralPopulation (const tpopulation &FirstHalf, const tpopulation &SecondHalf)
 Merge two populations in a new population object. More...
virtual GeneralPopulationoperator= (const GeneralPopulation &source)
virtual ~GeneralPopulation ()

Additional Inherited Members

- Protected Member Functions inherited from gplib::GeneralPopulation
void ResizePop (const int popsize, const int genesize)
 Change the population size. More...
- Protected Attributes inherited from gplib::GeneralPopulation
tpopulation Population
 The population of the current iteration. More...

Detailed Description

A population that is encoded as a simple binary string.

Definition at line 11 of file BinaryPopulation.h.

Constructor & Destructor Documentation

gplib::BinaryPopulation::BinaryPopulation ( const int  popsize,
const int  genesize,
GeneralRNG LocalRandom,
const bool  init = false 

Definition at line 5 of file BinaryPopulation.cpp.

References InitPop().

gplib::BinaryPopulation::~BinaryPopulation ( )

Definition at line 13 of file BinaryPopulation.cpp.

Member Function Documentation

void gplib::BinaryPopulation::InitPop ( )

Reimplemented from gplib::GeneralPopulation.

Definition at line 17 of file BinaryPopulation.cpp.

References gplib::GeneralRNG::GetNumber(), and gplib::GeneralPopulation::Population.

Referenced by BinaryPopulation().

BinaryPopulation & gplib::BinaryPopulation::operator= ( const BinaryPopulation source)

Definition at line 26 of file BinaryPopulation.cpp.

References gplib::GeneralPopulation::operator=().

The documentation for this class was generated from the following files: