00001
00010 #ifndef _CrossoverMethod_h
00011 #define _CrossoverMethod_h
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "methods/EvolutionaryMethodIteration.h"
00022 #include "Population.h"
00023
00024
00025
00026
00027
00028 class CrossoverMethod
00029 {
00030 public:
00031
00032
00035 virtual ~CrossoverMethod(void);
00036
00037
00038
00039
00046 virtual std::auto_ptr<CrossoverMethod> Clone() const = 0;
00047
00060 virtual void Crossover
00061 (Population& population,
00062 double crossoverRate,
00063 EvolutionaryMethodIteration& iteration) const = 0;
00064
00065
00066
00071 static const std::vector<CrossoverMethod*>& CrossoverMethods();
00072
00079 virtual wxString ToString() const = 0;
00080
00087 virtual wxString Name() const = 0;
00088
00096 static wxString BaseClassName();
00097
00098
00099
00100 protected:
00101
00104 CrossoverMethod(void);
00105
00110 CrossoverMethod(const CrossoverMethod& from);
00111
00112 private:
00113
00118 static std::vector<CrossoverMethod*>& rCrossoverMethods();
00119
00120 };
00121
00122
00123
00124
00125
00126
00127
00128 #endif // _CrossoverMethod_h