Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

gal::GrayCodeChromosome< T > Class Template Reference

class GrayCodeChromosome has one additional encoding between the raw bits and the represented value. More...

#include <GrayCodeChromosome.h>

Inheritance diagram for gal::GrayCodeChromosome< T >:

[legend]
List of all members.

Public Member Functions

 GrayCodeChromosome (int length)
 Constructs a GrayCodeChromosome and initialises it randomly.
std::list< char > const getInterpretedBitstring ()
 Returns the interpreted binary bitstring that corresponds to the raw, Gray encoded bitstring.

Detailed Description

template<class T>
class gal::GrayCodeChromosome< T >

class GrayCodeChromosome has one additional encoding between the raw bits and the represented value.

Before getting the actual value the raw bitstring is first Gray-decoded. This is mainly useful when representing scalar numbers. Integer numbers that differ by one, always differ by just one flipped bit. Note that this class still needs to be specialised.


Constructor & Destructor Documentation

template<class T>
gal::GrayCodeChromosome< T >::GrayCodeChromosome int  length  )  [inline]
 

Constructs a GrayCodeChromosome and initialises it randomly.


Member Function Documentation

template<class T>
std::list<char> const gal::GrayCodeChromosome< T >::getInterpretedBitstring  )  [inline, virtual]
 

Returns the interpreted binary bitstring that corresponds to the raw, Gray encoded bitstring.

Reimplemented from gal::Chromosome< T >.


The documentation for this class was generated from the following file:
Generated on Tue Oct 20 12:59:24 2009 for LabSci GALib optimisation by genetic algorithms, student version by  doxygen 1.3.9.1