ECF 1.5
FloatingPoint.h
1#ifndef FLOATINGPOINT_H_
2#define FLOATINGPOINT_H_
3
4#include "../RealValueGenotype.h"
5#include "FloatingPointMutSimple.h"
6#include "FloatingPointCrsOnePoint.h"
7#include "FloatingPointCrsArithmetic.h"
8#include "FloatingPointCrsDiscrete.h"
9#include "FloatingPointCrsArithmeticSimple.h"
10#include "FloatingPointCrsArithmeticSingle.h"
11#include "FloatingPointCrsAverage.h"
12#include "FloatingPointCrsFlat.h"
13#include "FloatingPointCrsBlx.h"
14#include "FloatingPointCrsHeuristic.h"
15#include "FloatingPointCrsRandom.h"
16#include "FloatingPointCrsSbx.h"
17#include "FloatingPointCrsBga.h"
18#include "FloatingPointCrsLocal.h"
19#include "FloatingPointCrsBlxAlpha.h"
20#include "FloatingPointCrsBlxAlphaBeta.h"
21
22namespace FloatingPoint
23{
24
40
41public:
42
44 { name_="FloatingPoint"; }
45
46 bool initialize (StateP state);
47
48 void registerParameters(StateP state);
49
51 double getLBound ()
52 { return minValue_; }
53
55 double getUBound ()
56 { return maxValue_; }
57
59 {
60 FloatingPoint *newObject = new FloatingPoint(*this);
61 return newObject;
62 }
63
65 std::vector<CrossoverOpP> getCrossoverOp()
66 {
67 std::vector<CrossoverOpP> crx;
68 crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsOnePoint));
69 crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsArithmetic));
70 crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsDiscrete));
71 crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsArithmeticSimple));
72 crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsArithmeticSingle));
73 crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsAverage));
74 crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsFlat));
75 crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsHeuristic));
76 crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsSbx));
77 crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsBga));
78 crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsLocal));
79 crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsBlxAlpha));
80 crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsBlxAlphaBeta));
81 // control operator - not to be used in optimization
82 //crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsRandom));
83 return crx;
84 }
85
86 std::vector<MutationOpP> getMutationOp()
87 {
88 std::vector<MutationOpP> mut;
89 mut.push_back(static_cast<MutationOpP> (new FloatingPointMutSimple));
90 return mut;
91 }
92
93 void write(XMLNode& xFloatingPoint);
94 void read(XMLNode& xFloatingPoint);
95};
96}
97
98typedef boost::shared_ptr<FloatingPoint::FloatingPoint> FloatingPointP;
99#endif
FloatingPoint genotype: offspring is defined as a linear combination of two vectors.
FloatingPoint genotype: take recombination point k. Child 1 is parent1 until k, rest is arithmetic av...
FloatingPoint genotype: take random allele k. That point is arithmetic average of parents,...
FloatingPoint genotype: child is average value of parent genes.
FloatingPoint genotype: BGA crossover (http://bib.irb.hr/datoteka/640222.CEC_2013....
FloatingPoint genotype: BLX alpha-beta crossover (http://bib.irb.hr/datoteka/640222....
FloatingPoint genotype: BLX alpha crossover (http://bib.irb.hr/datoteka/640222.CEC_2013....
FloatingPoint genotype: allele value for each gene is either from parent1 or from parent2 with equal ...
FloatingPoint genotype: value on allele i is random value taken from min-max interval from parents.
FloatingPoint genotype: value on allele i smaller gene value + rand value * (greater - smaller value)
FloatingPoint genotype: local crossover (http://bib.irb.hr/datoteka/640222.CEC_2013....
FloatingPoint genotype: one point crossover operator with permissible split points only between dimen...
FloatingPoint genotype: SBX crossover (http://citeseerx.ist.psu.edu/viewdoc/download?...
FloatingPoint class - implements genotype as a vector of floating point values.
Definition: FloatingPoint.h:39
double getUBound()
return upper bound of the defined interval
Definition: FloatingPoint.h:55
std::vector< MutationOpP > getMutationOp()
Create and return a vector of mutation operators.
Definition: FloatingPoint.h:86
double getLBound()
return lower bound of the defined interval
Definition: FloatingPoint.h:51
std::vector< CrossoverOpP > getCrossoverOp()
return usable crx operators
Definition: FloatingPoint.h:65
FloatingPoint * copy()
Create an identical copy of the genotype object.
Definition: FloatingPoint.h:58
FloatingPoint genotype: simple mutation where a single vector element is mutated. New value is random...
RealValueGenotype class - abstract genotype class for genotypes that represent a vector of real value...