• Main Page
  • Modules
  • Classes
  • Files
  • File List

D:/Projekt/ECF_trunk/ECF/floatingpoint/FloatingPoint.h

00001 #ifndef FLOATINGPOINT_H_
00002 #define FLOATINGPOINT_H_
00003 
00004 #include "../RealValueGenotype.h"
00005 #include "FloatingPointMutSimple.h"
00006 #include "FloatingPointCrsOnePoint.h"
00007 #include "FloatingPointCrsArithmetic.h"
00008 #include "FloatingPointCrsDiscrete.h"
00009 #include "FloatingPointCrsArithmeticSimple.h"
00010 #include "FloatingPointCrsArithmeticSingle.h"
00011 #include "FloatingPointCrsAverage.h"
00012 #include "FloatingPointCrsFlat.h"
00013 #include "FloatingPointCrsBlx.h"
00014 #include "FloatingPointCrsHeuristic.h"
00015 #include "FloatingPointCrsRandom.h"
00016 #include "FloatingPointCrsSbx.h"
00017 #include "FloatingPointCrsBga.h"
00018 #include "FloatingPointCrsLocal.h"
00019 #include "FloatingPointCrsBlxAlpha.h"
00020 #include "FloatingPointCrsBlxAlphaBeta.h"
00021 
00022 namespace FloatingPoint
00023 {
00024 
00039 class FloatingPoint: public RealValueGenotype {
00040 
00041 public:
00042 
00043     FloatingPoint ()
00044     {   name_="FloatingPoint";  }
00045 
00046     bool initialize (StateP state);
00047 
00048     void registerParameters(StateP state);
00049 
00051     double getLBound ()
00052     {   return minValue_;   }
00053 
00055     double getUBound ()
00056     {   return maxValue_;   }
00057 
00058     FloatingPoint* copy()
00059     {
00060         FloatingPoint *newObject = new FloatingPoint(*this);
00061         return newObject;
00062     }
00063 
00065     std::vector<CrossoverOpP> getCrossoverOp()
00066     {
00067         std::vector<CrossoverOpP> crx;
00068         crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsOnePoint));
00069         crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsArithmetic));
00070         crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsDiscrete));
00071         crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsArithmeticSimple));
00072         crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsArithmeticSingle));
00073         crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsAverage));
00074         crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsFlat));
00075 
00076 //      TODO: postoji li i ta verzija?
00077 //      crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsBlx));
00078 //
00079         crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsHeuristic));
00080         crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsRandom));
00081 
00082 //      TODO: proizvodi +-beskonacno
00083 //      crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsSbx));
00084 //
00085         crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsBga));
00086         crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsLocal));
00087         crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsBlxAlpha));
00088         crx.push_back(static_cast<CrossoverOpP> (new FloatingPointCrsBlxAlphaBeta));
00089         return crx;
00090     }
00091 
00092     std::vector<MutationOpP> getMutationOp()
00093     {
00094         std::vector<MutationOpP> mut;
00095         mut.push_back(static_cast<MutationOpP> (new FloatingPointMutSimple));
00096         return mut;
00097     }
00098 
00099     void write(XMLNode& xFloatingPoint);
00100     void read(XMLNode& xFloatingPoint);
00101 };
00102 }
00103 
00104 typedef boost::shared_ptr<FloatingPoint::FloatingPoint> FloatingPointP;
00105 #endif

Generated on Fri Jul 5 2013 09:34:23 for ECF by  doxygen 1.7.1