![]() |
ECF 1.7
|
BitString class - implements genotype as a series of bits. More...
#include <BitString.h>
Public Member Functions | |
| BitString (uint nBits=0) | |
| void | registerParameters (StateP state) |
| Register genotype's parameters (called before Genotype::initialize). | |
| bool | initialize (StateP state) |
| Initialize a genotype object (read parameters, perform sanity check, build data). | |
| BitString * | copy () |
| Create an identical copy of the genotype object. | |
| std::vector< CrossoverOpP > | getCrossoverOp () |
| Create and return a vector of crossover operators. | |
| std::vector< MutationOpP > | getMutationOp () |
| Create and return a vector of mutation operators. | |
| void | write (XMLNode &xBitString) |
| Write genotype data to XMLNode. | |
| void | read (XMLNode &xBitString) |
| Read genotype data from XMLNode. | |
| Public Member Functions inherited from Genotype | |
| bool | registerParameter (StateP state, std::string name, voidP value, enum ECF::type T, std::string description="") |
| Register a single parameter. | |
| voidP | getParameterValue (StateP state, std::string name) |
| Read single parameter value from Registry. | |
| bool | setParameterValue (StateP state, std::string name, voidP value) |
| Write single parameter value to Registry. | |
| bool | isParameterDefined (StateP state, std::string name) |
| Check if parameter is defined in the configuration. | |
| virtual uint | getGenomeSize () |
| std::string | getName () |
| Return genotype's name (each genotype is uniquely identified with its name). | |
| uint | getGenotypeId () |
| Return this genotype's index in individual structure. | |
| void | setGenotypeId (uint id) |
| Set genotype index in an individual. | |
| std::string | toString () |
| Output genotype to string. | |
Public Attributes | |
| std::vector< bool > | bits |
Protected Attributes | |
| uint | nBits_ |
| Protected Attributes inherited from Genotype | |
| std::string | name_ |
| genotype's name | |
| uint | genotypeId_ |
| this genotype's unique index in individual structure | |
BitString class - implements genotype as a series of bits.
Definition at line 23 of file BitString.h.
|
inline |
Definition at line 31 of file BitString.h.
|
inlinevirtual |
Create an identical copy of the genotype object.
Implements Genotype.
Definition at line 66 of file BitString.h.
|
inlinevirtual |
Create and return a vector of crossover operators.
Reimplemented from Genotype.
Definition at line 72 of file BitString.h.
|
inlinevirtual |
Create and return a vector of mutation operators.
Reimplemented from Genotype.
Definition at line 80 of file BitString.h.
|
inlinevirtual |
Initialize a genotype object (read parameters, perform sanity check, build data).
Implements Genotype.
Definition at line 44 of file BitString.h.
|
inlinevirtual |
|
inlinevirtual |
Register genotype's parameters (called before Genotype::initialize).
Reimplemented from Genotype.
Definition at line 36 of file BitString.h.
|
inlinevirtual |
| std::vector<bool> BitString::BitString::bits |
Definition at line 29 of file BitString.h.
|
protected |
Definition at line 26 of file BitString.h.