ECF 1.5
Public Member Functions | Public Attributes | Protected Attributes | List of all members
BitString::BitString Class Reference

BitString class - implements genotype as a series of bits. More...

#include <BitString.h>

Inheritance diagram for BitString::BitString:
Genotype

Public Member Functions

 BitString (uint nBits=0)
 
void registerParameters (StateP state)
 Register genotype's parameters (called before Genotype::initialize) More...
 
bool initialize (StateP state)
 Initialize a genotype object (read parameters, perform sanity check, build data) More...
 
BitStringcopy ()
 Create an identical copy of the genotype object. More...
 
std::vector< CrossoverOpP > getCrossoverOp ()
 Create and return a vector of crossover operators. More...
 
std::vector< MutationOpP > getMutationOp ()
 Create and return a vector of mutation operators. More...
 
void write (XMLNode &xBitString)
 Write genotype data to XMLNode. More...
 
void read (XMLNode &xBitString)
 Read genotype data from XMLNode. More...
 
- Public Member Functions inherited from Genotype
virtual bool initialize (StateP state)=0
 Initialize a genotype object (read parameters, perform sanity check, build data) More...
 
virtual Genotypecopy ()=0
 Create an identical copy of the genotype object. More...
 
virtual std::vector< CrossoverOpP > getCrossoverOp ()
 Create and return a vector of crossover operators. More...
 
virtual std::vector< MutationOpP > getMutationOp ()
 Create and return a vector of mutation operators. More...
 
virtual void registerParameters (StateP)
 Register genotype's parameters (called before Genotype::initialize) More...
 
bool registerParameter (StateP state, std::string name, voidP value, enum ECF::type T, std::string description="")
 Register a single parameter. More...
 
voidP getParameterValue (StateP state, std::string name)
 Read single parameter value from Registry. More...
 
bool setParameterValue (StateP state, std::string name, voidP value)
 Write single parameter value to Registry. More...
 
bool isParameterDefined (StateP state, std::string name)
 Check if parameter is defined in the configuration. More...
 
virtual void read (XMLNode &)=0
 Read genotype data from XMLNode. More...
 
virtual void write (XMLNode &)=0
 Write genotype data to XMLNode. More...
 
virtual uint getGenomeSize ()
 
std::string getName ()
 Return genotype's name (each genotype is uniquely identified with its name). More...
 
uint getGenotypeId ()
 Return this genotype's index in individual structure. More...
 
void setGenotypeId (uint id)
 Set genotype index in an individual. More...
 
std::string toString ()
 Output genotype to string. More...
 

Public Attributes

std::vector< bool > bits
 

Protected Attributes

uint nBits_
 
- Protected Attributes inherited from Genotype
std::string name_
 genotype's name More...
 
uint genotypeId_
 this genotype's unique index in individual structure More...
 

Detailed Description

BitString class - implements genotype as a series of bits.

Definition at line 23 of file BitString.h.

Constructor & Destructor Documentation

◆ BitString()

BitString::BitString::BitString ( uint  nBits = 0)
inline

Definition at line 31 of file BitString.h.

Member Function Documentation

◆ copy()

BitString * BitString::BitString::copy ( )
inlinevirtual

Create an identical copy of the genotype object.

Implements Genotype.

Definition at line 66 of file BitString.h.

◆ getCrossoverOp()

std::vector< CrossoverOpP > BitString::BitString::getCrossoverOp ( )
inlinevirtual

Create and return a vector of crossover operators.

Reimplemented from Genotype.

Definition at line 72 of file BitString.h.

◆ getMutationOp()

std::vector< MutationOpP > BitString::BitString::getMutationOp ( )
inlinevirtual

Create and return a vector of mutation operators.

Reimplemented from Genotype.

Definition at line 80 of file BitString.h.

◆ initialize()

bool BitString::BitString::initialize ( StateP  state)
inlinevirtual

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

Implements Genotype.

Definition at line 44 of file BitString.h.

◆ read()

void BitString::BitString::read ( XMLNode &  )
inlinevirtual

Read genotype data from XMLNode.

Implements Genotype.

Definition at line 101 of file BitString.h.

◆ registerParameters()

void BitString::BitString::registerParameters ( StateP  )
inlinevirtual

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

Reimplemented from Genotype.

Definition at line 36 of file BitString.h.

◆ write()

void BitString::BitString::write ( XMLNode &  )
inlinevirtual

Write genotype data to XMLNode.

Implements Genotype.

Definition at line 88 of file BitString.h.

Member Data Documentation

◆ bits

std::vector<bool> BitString::BitString::bits

Definition at line 29 of file BitString.h.

◆ nBits_

uint BitString::BitString::nBits_
protected

Definition at line 26 of file BitString.h.


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