|
User Documentation |
|
Centre for Vision, Speech & Signal Processing |
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.
| chromosomeSize | number of bits per chromosome |
| minChromosomes | minimum number of chromosomes in gene |
| maxChromosomes | maximum 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
|