Qualia  0.2
Public Member Functions | Public Attributes | List of all members
BinaryChromosomeProperties Class Reference

#include <BinaryChromosome.h>

Collaboration diagram for BinaryChromosomeProperties:
Collaboration graph
[legend]

Public Member Functions

 BinaryChromosomeProperties (unsigned int nGenes, const uint8_t *geneSizes, Initializer initializer=0, Mutator mutator=0)
 
unsigned int nGenes () const
 Returns the number of genes in the chromosome. More...
 
uint8_t geneSize (int i) const
 Returns the size (in bits) of gene #i#. More...
 
unsigned int bitSize () const
 Returns the total size (in bits) of the chromosome. More...
 
unsigned int byteSize () const
 Returns the total size (in bytes) of the chromosome. More...
 
int getStartBitPosition (int gene) const
 Returns the bit at which gene #gene# starts. More...
 
virtual bool equals (const BinaryChromosomeProperties &info)
 Tests equality. More...
 

Public Attributes

unsigned int _nGenes
 The number of genes in the chromosome. More...
 
uint8_t * _geneSizes
 The size (in bits) of each gene. More...
 
Initializer initializer
 The initializer, mutator and evaluator functions. More...
 
Mutator mutator
 
Evaluator evaluator
 

Constructor & Destructor Documentation

BinaryChromosomeProperties::BinaryChromosomeProperties ( unsigned int  nGenes,
const uint8_t *  geneSizes,
Initializer  initializer = 0,
Mutator  mutator = 0 
)

Member Function Documentation

unsigned int BinaryChromosomeProperties::bitSize ( ) const

Returns the total size (in bits) of the chromosome.

unsigned int BinaryChromosomeProperties::byteSize ( ) const
inline

Returns the total size (in bytes) of the chromosome.

bool BinaryChromosomeProperties::equals ( const BinaryChromosomeProperties info)
virtual

Tests equality.

uint8_t BinaryChromosomeProperties::geneSize ( int  i) const
inline

Returns the size (in bits) of gene #i#.

int BinaryChromosomeProperties::getStartBitPosition ( int  gene) const

Returns the bit at which gene #gene# starts.

unsigned int BinaryChromosomeProperties::nGenes ( ) const
inline

Returns the number of genes in the chromosome.

Member Data Documentation

uint8_t* BinaryChromosomeProperties::_geneSizes

The size (in bits) of each gene.

unsigned int BinaryChromosomeProperties::_nGenes

The number of genes in the chromosome.

Evaluator BinaryChromosomeProperties::evaluator
Initializer BinaryChromosomeProperties::initializer

The initializer, mutator and evaluator functions.

Mutator BinaryChromosomeProperties::mutator

The documentation for this class was generated from the following files: