MTK++ Latest version: 0.2.0

gaSelection.h
Go to the documentation of this file.
00001 
00033 #ifndef GASELECTION_H
00034 #define GASELECTION_H
00035 
00036 #include <iostream>
00037 #include <string>
00038 #include <vector>
00039 
00040 namespace MTKpp
00041 {
00042 
00043 class gaOperators;
00044 class gaGaussian;
00045 
00046 // ============================================================
00047 // Class : gaSelection()
00048 // ------------------------------------------------------------
00069 // ============================================================
00070 
00071 class gaSelection
00072 {
00073 public:
00074 
00081     gaSelection(gaOperators *parent = 0, std::string selection = "semi-random", int maxInds = 0);
00082 
00084     virtual ~gaSelection();
00085 
00087     int select();
00088 
00095     void setGaussian(int start, int end, double selPress);
00096 
00097 protected: // Functions
00098 
00100     int __random();
00101 
00103     int __semi_random();
00104 
00109     int __rouletteWheel();
00110 
00115     int __tournament();
00116 
00122     int __truncation();
00123 
00124 protected: // Data
00125 
00127     gaOperators*                  pParent;
00128 
00130     gaGaussian*                   pGaGaussian;
00131 
00133     std::string                   selection;
00134 
00136     int                           maxInds;
00137 };
00138 
00139 } // MTKpp namespace
00140 
00141 #endif // GASELECTION_H

Generated on Fri Dec 23 2011 09:28:50 for MTK++ by Doxygen 1.7.5.1