1#include "../Genotype.h"
5#include "IntGenotypeCrxOp.h"
6#include "IntGenotypeCrxTwoPoint.h"
7#include "IntGenotypeCrxAverage.h"
8#include "IntGenotypeMutOp.h"
27 class IntGenotype :
public Genotype
30 int minValue_, maxValue_;
32 std::vector<int> intValues;
36 name_ =
"IntGenotype";
41 IntGenotype *newObject =
new IntGenotype(*
this);
58 std::vector<CrossoverOpP> crx;
67 std::vector<MutationOpP> mut;
72 void registerParameters(StateP state);
74 bool initialize(StateP state);
76 void write(XMLNode &xIntGenotype);
79 void read(XMLNode& xIntGenotype);
83typedef std::shared_ptr<IntGenotype::IntGenotype> IntGenotypeP;
std::string name_
genotype's name
IntGenotype genotype: average crossover operator.
IntGenotype genotype: uniform crossover operator.
IntGenotype genotype: two-point crossover operator.
std::vector< MutationOpP > getMutationOp()
Create and return a vector of mutation operators.
IntGenotype * copy()
Create an identical copy of the genotype object.
int getLBound()
return lower bound of the defined interval
int getUBound()
return upper bound of the defined interval
std::vector< CrossoverOpP > getCrossoverOp()
Create and return a vector of crossover operators.
IntGenotype genotype: single-point mutation operator.