#include <Genotype.h>
Public Member Functions | |
| virtual bool | initialize (StateP state)=0 |
| virtual Genotype * | copy ()=0 |
| virtual std::vector< CrossoverOpP > | getCrossoverOp () |
| virtual std::vector< MutationOpP > | getMutationOp () |
| virtual void | registerParameters (StateP) |
| bool | registerParameter (StateP state, std::string name, voidP value, enum ECF::type T) |
| 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 void | read (XMLNode &)=0 |
| virtual void | write (XMLNode &)=0 |
| virtual uint | getGenomeSize () |
| std::string | getName () |
| uint | getGenotypeId () |
| void | setGenotypeId (uint id) |
Protected Attributes | |
| std::string | name_ |
| genotype's name | |
| uint | genotypeId_ |
| this genotype's index in individual structure | |
Genotype base class.
All Genotypes must inherit this one. Each individual contains a vector of Genotype objects. Each Genotype is an independent object with independent parameters.
Each Genotype class must provide its CrossoverOp and MutationOp operator classes!
Definition at line 24 of file Genotype.h.
| virtual Genotype* Genotype::copy | ( | ) | [pure virtual] |
Create an identical copy of the genotype object
Implemented in Binary::Binary, BitString::BitString, FloatingPoint::FloatingPoint, Permutation::Permutation, and Tree::Tree.
| virtual std::vector<CrossoverOpP> Genotype::getCrossoverOp | ( | ) | [inline, virtual] |
Create and return a vector of crossover operators
Reimplemented in Binary::Binary, BitString::BitString, FloatingPoint::FloatingPoint, Permutation::Permutation, and Tree::Tree.
Definition at line 47 of file Genotype.h.
| uint Genotype::getGenotypeId | ( | ) | [inline] |
Return this genotype's index in individual structure
Definition at line 97 of file Genotype.h.
| virtual std::vector<MutationOpP> Genotype::getMutationOp | ( | ) | [inline, virtual] |
Create and return a vector of mutation operators
Reimplemented in Binary::Binary, BitString::BitString, FloatingPoint::FloatingPoint, Permutation::Permutation, and Tree::Tree.
Definition at line 56 of file Genotype.h.
| std::string Genotype::getName | ( | ) | [inline] |
Return genotype's name
Definition at line 91 of file Genotype.h.
| virtual bool Genotype::initialize | ( | StateP | state | ) | [pure virtual] |
Initialize a genotype object (read parameters, perform sanity check, build data)
Implemented in Binary::Binary, BitString::BitString, FloatingPoint::FloatingPoint, Permutation::Permutation, and Tree::Tree.
| virtual void Genotype::read | ( | XMLNode & | ) | [pure virtual] |
Read genotype data from XMLNode
Implemented in Binary::Binary, BitString::BitString, FloatingPoint::FloatingPoint, Permutation::Permutation, and Tree::Tree.
| virtual void Genotype::registerParameters | ( | StateP | ) | [inline, virtual] |
Register genotype's parameters (called before Genotype::initialize)
Reimplemented in Binary::Binary, BitString::BitString, FloatingPoint::FloatingPoint, Permutation::Permutation, and Tree::Tree.
Definition at line 65 of file Genotype.h.
| void Genotype::setGenotypeId | ( | uint | id | ) | [inline] |
Set genotype index in an individual
Definition at line 103 of file Genotype.h.
| virtual void Genotype::write | ( | XMLNode & | ) | [pure virtual] |
Write genotype data to XMLNode
Implemented in Binary::Binary, BitString::BitString, FloatingPoint::FloatingPoint, Permutation::Permutation, and Tree::Tree.
1.7.1