User Documentation
Centre for Vision, Speech & Signal Processing
DEVELOP IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
GeneC::GeneC(void)
GeneC::GetGene(void) const
GeneC::GetFitness(void)
GeneC::SetFitness(RealT)
GeneC::IsNewGene(void)
GeneC::NewGene(void)
GeneC::OldGene(void)
GeneC::operator=(const GeneC &)
GeneC::RandomGene(UIntT,UIntT,UIntT)
GeneC::InitialGene(const IntSArray1dC &)
GeneC::Mutate(RealT)
GeneC::Crossover(GeneC &,GeneC &)
GeneC
 
include "amma/GeneticAlgorithm.hh"
User Level:Default
Library:Tools
Example:exBnd.cc
Section:Optimisation Numerical Methods.Optimisation
In Scope:GeneticAlgorithmC

Variables:

Methods:
GeneC()
Constructs empty string and indicates not yet evaluated.

const IntSArray1dC GetGene() const
Access to the gene string.

RealT GetFitness()
Access to the fitness associated with the gene.

void SetFitness(RealT f)
Specifies the fitness associated with the gene.

BooleanT IsNewGene()
Tests whether gene fitness has been evaluated or not.

void NewGene()
Specifies that gene is new, ie not yet evaluated.

void OldGene()
Specifies that gene is old, ie has been evaluated.

GeneC & operator=(const GeneC & oth)
Assignment operator

void RandomGene(UIntT chromosomeSize,UIntT minChromosomes,UIntT maxChromosomes)
Generates a random gene.
chromosomeSizenumber of bits per chromosome
minChromosomesminimum number of chromosomes in gene
maxChromosomesmaximum number of chromosomes in gene
Will generate a gene consisting of a random number of chromosome between the min and max limits. Each chromosome will have the specified number of bits set to random values.

void InitialGene(const IntSArray1dC & init)
Specifies a bit string to use for initialisation.
Copies a predefined string into the current gene. Used to initialise the first gene to contain the results of the previous optimisation. This assures that the results can only get better by using the Elitist strategy.

void Mutate(RealT probMutation)
Mutates the current gene.
Performs mutation on an individual gene. There is a probability probMutation of mutation in which case a randomly selected bit is flipped and the chance of further mutation is tested etc.

void Crossover(GeneC & mum,GeneC & dad)
Crossover of two genes.
Performs crossover between two genes. A randomly selected end segment of the genes is exchanged if the result will be two new genes.


Programmer:Robert Crida, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001