MOGAL
Public Member Functions

mogal::Genome Class Reference

Interface for a genome in the genetic algorithm. More...

#include <genome.h>

Inherited by mogal::DoubleVectorGenome.

List of all members.

Public Member Functions

virtual bool calculateFitness ()=0
 Calculate the fitness of this genome.
virtual void setActiveFitnessComponent (int componentNumber)
 In a multi-objective genetic algorithm, the fitness component specified by componentNumber will be used when comparing genomes in the Genome::isFitterThan function.
virtual bool isFitterThan (const Genome *pGenome) const =0
 This function should return true is the current genome is considered to be strictly more fit than the genome in pGenome.
virtual Genomereproduce (const Genome *pGenome) const =0
 Return a new genome by combining the current genome and the one in pGenome.
virtual Genomeclone () const =0
 Create an exact copy of the current genome (this should also copy the calculated fitness information, since it is also used to store the current best genomes).
virtual void mutate ()=0
 Introduce mutations in this genome.
virtual std::string getFitnessDescription () const =0
 Return a description of the fitness of this genome.

Detailed Description


Member Function Documentation

virtual bool mogal::Genome::calculateFitness ( ) [pure virtual]
virtual std::string mogal::Genome::getFitnessDescription ( ) const [pure virtual]
virtual void mogal::Genome::mutate ( ) [pure virtual]
virtual Genome* mogal::Genome::reproduce ( const Genome pGenome) const [pure virtual]

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