Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Friends

Binary::Binary Class Reference

Binary class - implements genotype as a binary coded real values. More...

#include <Binary.h>

Inheritance diagram for Binary::Binary:
Genotype

List of all members.

Public Member Functions

uint getNumBits ()
bool initialize (StateP state)
void registerParameters (StateP state)
bool update (void)
Binarycopy ()
std::vector< CrossoverOpP > getCrossoverOp ()
std::vector< MutationOpP > getMutationOp ()
void write (XMLNode &xBinary)
void read (XMLNode &xBinary)

Public Attributes

std::vector< long int > decValue
 integer values of bit representation
std::vector< double > realValue
 values in real domain
std::vector< v_bool > variables
 vector of bit vectors

Protected Types

typedef std::vector< bool > v_bool

Protected Member Functions

double logbase (double a, double base)
double round (double, int)

Protected Attributes

double minValue_
 lower bound in real domain
double maxValue_
 upper bound in real domain
uint nDecimal_
 number of digits after the decimal point
uint nDimension_
 dimensionality
uint nBits_
 number of bits for a single dimension
long potention_
bool bRounding_
 use rounding with 'precision' digits on real values in the chromosome
v_bool vBool_

Friends

class BinaryMutSimple

Detailed Description

Binary class - implements genotype as a binary coded real values.

Binary genotype parameters are:

Definition at line 23 of file Binary.h.


Member Function Documentation

Binary* Binary::Binary::copy (  )  [inline, virtual]

Create an identical copy of the genotype object

Implements Genotype.

Definition at line 62 of file Binary.h.

std::vector<CrossoverOpP> Binary::Binary::getCrossoverOp (  )  [inline, virtual]

Create and return a vector of crossover operators

Reimplemented from Genotype.

Definition at line 68 of file Binary.h.

std::vector<MutationOpP> Binary::Binary::getMutationOp (  )  [inline, virtual]

Create and return a vector of mutation operators

Reimplemented from Genotype.

Definition at line 76 of file Binary.h.

uint Binary::Binary::getNumBits (  )  [inline]

Return number of bits used in a single dimension in real domain.

Definition at line 50 of file Binary.h.

bool Binary::Binary::initialize ( StateP  state  )  [virtual]

Initialize a genotype object (read parameters, perform sanity check, build data)

Implements Genotype.

Definition at line 33 of file Binary.cpp.

void Binary::Binary::read ( XMLNode &   )  [virtual]

Read genotype data from XMLNode

Implements Genotype.

Definition at line 138 of file Binary.cpp.

void Binary::Binary::registerParameters ( StateP   )  [virtual]

Register genotype's parameters (called before Genotype::initialize)

Reimplemented from Genotype.

Definition at line 23 of file Binary.cpp.

bool Binary::Binary::update ( void   ) 

Update genotype after change via genetic operators.

Definition at line 103 of file Binary.cpp.

void Binary::Binary::write ( XMLNode &   )  [virtual]

Write genotype data to XMLNode

Implements Genotype.

Definition at line 124 of file Binary.cpp.


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