MTK++ Latest version: 0.2.0

gaMutate.h
Go to the documentation of this file.
00001 
00033 #ifndef GAMUTATE_H
00034 #define GAMUTATE_H
00035 
00036 #include <iostream>
00037 #include <string>
00038 #include <vector>
00039 
00040 #include "Utils/constants.h"
00041 
00042 namespace MTKpp
00043 {
00044 
00045 class gaIndividual;
00046 class gaOperators;
00047 
00048 // ============================================================
00049 // Class : gaMutate()
00050 // ------------------------------------------------------------
00058 // ============================================================
00059 
00060 class gaMutate
00061 {
00062 public:
00063 
00071     gaMutate(gaOperators *parent, std::vector<int> genePerChr, 
00072              std::string mutate = "single-gene", int chrPerInd = 1);
00073 
00075     virtual ~gaMutate();
00076 
00082     bool mutation(gaIndividual* ind);
00083 
00084 protected: // functions
00085 
00090     bool __singleGene(gaIndividual* ind);
00091 
00096     bool __multipleGene(gaIndividual* ind);
00097 
00098 protected: // data
00099 
00101     gaOperators*                  pParent;
00102 
00104     std::string                   mutate;
00105 
00107     int                           chrPerInd;
00108 
00110     std::vector<int>              genePerChr;
00111 };
00112 
00113 } // MTKpp namespace
00114 
00115 #endif // GAMUTATE_H

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