Public Member Functions

zeus::IGAChromosome Class Reference

#include <IGAChromosome.hpp>

Inheritance diagram for zeus::IGAChromosome:
zeus::TGAChromosome

List of all members.

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

Detailed Description

Individual Interface of an individum of a genetic population


Member Function Documentation

virtual Retval MQUALIFIER zeus::IGAChromosome::clone ( IGAChromosome *&  rpNewChrom ) const [pure virtual]

This method clones the whole DNA and returns a new chromosome.

Parameters:
rpNewChrom: return parameter
Return values:
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.

Parameters:
rChrom: 2nd chromosone.
rpNewChrom1: generated chromosone. Must be added to the new individual
rpNewChrom2: generated chromosone. Is the inverse Chromosone to rpNewChrom1
Return values:
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]

Returns the ID

Returns:
ID of the chromosome

Implemented in zeus::TGAChromosome.

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

Parameters:
iIndex: Index of the gene
Returns:
indexed 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

Parameters:
iIndex: Index of the gene
Returns:
indexed gene

Implemented in zeus::TGAChromosome.

virtual Int MQUALIFIER zeus::IGAChromosome::getGeneCount (  ) const [pure virtual]

Returns the number of genes

Returns:
number of genes

Implemented in zeus::TGAChromosome.

virtual Int MQUALIFIER zeus::IGAChromosome::getGeneSize (  ) const [pure virtual]

Returns the size of the genes since all genes have the same size.

Returns:
size of the gene in bytes

Implemented in zeus::TGAChromosome.

virtual void MQUALIFIER zeus::IGAChromosome::mutate (  ) [pure virtual]

Does some mutation

Implemented in zeus::TGAChromosome.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:32:27