#include <Genotype.h>
Public Member Functions | |
| virtual bool | initialize (StateP state)=0 |
| Initialize a genotype object (read parameters, perform sanity check, build data). | |
| virtual Genotype * | copy ()=0 |
| Create an identical copy of the genotype object. | |
| virtual std::vector< CrossoverOpP > | getCrossoverOp () |
| Create and return a vector of crossover operators. | |
| virtual std::vector< MutationOpP > | getMutationOp () |
| Create and return a vector of mutation operators. | |
| virtual void | registerParameters (StateP) |
| Register genotype's parameters (called before Genotype::initialize). | |
| 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 void | read (XMLNode &)=0 |
| Read genotype data from XMLNode. | |
| virtual void | write (XMLNode &)=0 |
| Write genotype data to XMLNode. | |
| 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. | |
Protected Attributes | |
| std::string | name_ |
| genotype's name | |
| uint | genotypeId_ |
| this genotype's unique 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!
A genotype instance becomes active if:
Definition at line 35 of file Genotype.h.
1.7.1