MTK++ Latest version: 0.2.0

gaOperators.h
Go to the documentation of this file.
00001 
00034 #ifndef GAOPERATORS_H
00035 #define GAOPERATORS_H
00036 
00037 #include <iostream>
00038 #include <string>
00039 #include <vector>
00040 
00041 #include "Utils/constants.h"
00042 
00043 namespace MTKpp
00044 {
00045 
00046 class gaOutput;
00047 class gaRegion;
00048 class gaPopulation;
00049 class gaSelection;
00050 class gaCrossOver;
00051 class gaMutate;
00052 class gaAverage;
00053 
00054 // ============================================================
00055 // Class : gaOperators()
00056 // ------------------------------------------------------------
00065 // ============================================================
00066 
00067 class gaOperators
00068 {
00069 public:
00070 
00075     gaOperators(gaRegion *parent = 0);
00076 
00078     virtual ~gaOperators();
00079 
00085     void setup();
00086 
00092     void keep(gaPopulation* curPop, gaPopulation* prePop);
00093 
00103     void crossover(gaPopulation* curPop, gaPopulation* prePop);
00104 
00110     void mutate(gaPopulation* curPop, gaPopulation* prePop);
00111 
00117     void average(gaPopulation* curPop, gaPopulation* prePop);
00118 
00124     void removeRedundant(gaPopulation* curPop, gaPopulation* prePop);
00125 
00126 protected:
00127 
00129     gaRegion*    pParent;
00130 
00132     gaSelection* pGaSelection;
00133 
00135     gaCrossOver* pGaCrossOver;
00136 
00138     gaMutate*    pGaMutate;
00139 
00141     gaAverage*   pGaAverage;
00142 
00144     gaOutput*    pGaOutput;
00145 
00147     int nKeep;
00148 
00150     int nCrossover;
00151 
00153     int nMutate;
00154 
00156     int nAverage;
00157 
00159     double chreDiff;
00160 
00162     std::string mutantName;
00163 };
00164 
00165 } // MTKpp namespace
00166 
00167 #endif // GAOPERATORS_H

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