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

gal::IntGCChromosome Class Reference

class IntGCChromosome implements a Chromosome<int> that represents a natural number. More...

#include <IntGCChromosome.h>

Inheritance diagram for gal::IntGCChromosome:

[legend]
List of all members.

Public Member Functions

 IntGCChromosome (int length)
 Constructs a new IntGCChromosome, initialising it randomly.
int const getValue ()
 Returns the decimal value that the bitstring represents.
std::string const getValueText ()
 Returns a string representation of the decimal value.

Detailed Description

class IntGCChromosome implements a Chromosome<int> that represents a natural number.

Bitstring is interpreted as a reversed binary number in Gray-encoding.

See also:
GrayCodeChromosome for a discussion of Gray encoding.


Constructor & Destructor Documentation

gal::IntGCChromosome::IntGCChromosome int  length  )  [inline]
 

Constructs a new IntGCChromosome, initialising it randomly.

Parameters:
length The length of the bitstring.


Member Function Documentation

int const gal::IntGCChromosome::getValue  )  [inline, virtual]
 

Returns the decimal value that the bitstring represents.

Reimplemented from gal::Chromosome< int >.

std::string const gal::IntGCChromosome::getValueText  )  [inline, virtual]
 

Returns a string representation of the decimal value.

Reimplemented from gal::Chromosome< int >.


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