00001
00009 #ifndef _SelectionMethod_h
00010 #define _SelectionMethod_h
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "methods/EvolutionaryMethodIteration.h"
00021 #include "Population.h"
00022
00023
00024
00025
00026 class SelectionMethod
00027 {
00028 public:
00029
00030
00033 virtual ~SelectionMethod(void);
00034
00035
00036
00037
00038
00045 virtual std::auto_ptr<SelectionMethod> Clone() const = 0;
00046
00057 virtual void Select
00058 (Population& population,
00059 double survivalRate,
00060 EvolutionaryMethodIteration& iteration) const = 0;
00061
00062
00063
00068 static const std::vector<SelectionMethod*>& SelectionMethods();
00069
00076 virtual wxString ToString() const = 0;
00077
00084 virtual wxString Name() const = 0;
00085
00093 static wxString BaseClassName();
00094
00095
00096
00097 protected:
00098
00101 SelectionMethod(void);
00102
00107 SelectionMethod(const SelectionMethod& from);
00108
00109 private:
00110
00115 static std::vector<SelectionMethod*>& rSelectionMethods();
00116
00117 };
00118
00119
00120
00121
00122
00123
00124
00125 #endif // _SelectionMethod_h