#include <IGAChromosome.hpp>
Public Member Functions | |
| virtual Uint MQUALIFIER | getChromosomeID () const =0 |
| virtual IByteArray &MQUALIFIER | getDNA ()=0 |
| virtual const IByteArray &MQUALIFIER | getDNAConst () const =0 |
| virtual Int MQUALIFIER | getGeneCount () const =0 |
| virtual Int MQUALIFIER | getGeneSize () const =0 |
| virtual IGAGene &MQUALIFIER | getGene (Int iIndex)=0 |
| virtual const IGAGene &MQUALIFIER | getGeneConst (Int iIndex) const =0 |
| virtual Retval MQUALIFIER | crossOver (IGAChromosome &rChrom, IGAChromosome *&rpNewChrom1, IGAChromosome *&rpNewChrom2)=0 |
| virtual Retval MQUALIFIER | clone (IGAChromosome *&rpNewChrom) const =0 |
| virtual void MQUALIFIER | mutate ()=0 |
Individual Interface of an individum of a genetic population
| virtual Retval MQUALIFIER zeus::IGAChromosome::clone | ( | IGAChromosome *& | rpNewChrom ) | const [pure virtual] |
This method clones the whole DNA and returns a new chromosome.
| rpNewChrom | : return parameter |
| RET_NOERROR | : clone generated |
| RET_REQUEST_FAILED | : Could not clone |
Implemented in zeus::TGAChromosome.
| virtual Retval MQUALIFIER zeus::IGAChromosome::crossOver | ( | IGAChromosome & | rChrom, |
| IGAChromosome *& | rpNewChrom1, | ||
| IGAChromosome *& | rpNewChrom2 | ||
| ) | [pure virtual] |
This method performs the crossover of two chromosones of the same kind. It is important that the type of the two chromosones are the same.
| rChrom | : 2nd chromosone. |
| rpNewChrom1 | : generated chromosone. Must be added to the new individual |
| rpNewChrom2 | : generated chromosone. Is the inverse Chromosone to rpNewChrom1 |
| RET_NOERROR | : Crossing completed |
| RET_REQUEST_FAILED | : Could not perform the crossover |
Implemented in zeus::TGAChromosome.
| virtual Uint MQUALIFIER zeus::IGAChromosome::getChromosomeID | ( | ) | const [pure virtual] |
| virtual IByteArray& MQUALIFIER zeus::IGAChromosome::getDNA | ( | ) | [pure virtual] |
returns the complete DNA of the chromosome
Implemented in zeus::TGAChromosome.
| virtual const IByteArray& MQUALIFIER zeus::IGAChromosome::getDNAConst | ( | ) | const [pure virtual] |
returns the complete DNA of the chromosome
Implemented in zeus::TGAChromosome.
| virtual IGAGene& MQUALIFIER zeus::IGAChromosome::getGene | ( | Int | iIndex ) | [pure virtual] |
Returns a gene. Each gene represents a set of data and a border of the crossover algorithm
| iIndex | : Index of the gene |
Implemented in zeus::TGAChromosome.
| virtual const IGAGene& MQUALIFIER zeus::IGAChromosome::getGeneConst | ( | Int | iIndex ) | const [pure virtual] |
Returns a gene. Each gene represents a set of data and a border of the crossover algorithm
| iIndex | : Index of the gene |
Implemented in zeus::TGAChromosome.
| virtual Int MQUALIFIER zeus::IGAChromosome::getGeneCount | ( | ) | const [pure virtual] |
| virtual Int MQUALIFIER zeus::IGAChromosome::getGeneSize | ( | ) | const [pure virtual] |
Returns the size of the genes since all genes have the same size.
Implemented in zeus::TGAChromosome.
| virtual void MQUALIFIER zeus::IGAChromosome::mutate | ( | ) | [pure virtual] |
Does some mutation
Implemented in zeus::TGAChromosome.