eoOneMaxMutation.h

00001 
00006 /*
00007 Template for simple mutation operators
00008 ======================================
00009 */
00010 
00011 #ifndef eoOneMaxMutation_H
00012 #define eoOneMaxMutation_H
00013 
00014 
00015 #include <eoOp.h>
00016 
00024 template<class GenotypeT>
00025 class eoOneMaxMutation: public eoMonOp<GenotypeT>
00026 {
00027 public:
00031     // START eventually add or modify the anyVariable argument
00032     eoOneMaxMutation()
00033     //  eoOneMaxMutation( varType  _anyVariable) : anyVariable(_anyVariable)
00034     // END eventually add or modify the anyVariable argument
00035         {
00036             // START Code of Ctor of an eoOneMaxEvalFunc object
00037             // END   Code of Ctor of an eoOneMaxEvalFunc object
00038         }
00039 
00041     string className() const { return "eoOneMaxMutation"; }
00042 
00047     bool operator()(GenotypeT & _genotype)
00048         {
00049             bool isModified(true);
00050             // START code for mutation of the _genotype object
00051 
00058             return isModified;
00059             // END code for mutation of the _genotype object
00060         }
00061 
00062 private:
00063 // START Private data of an eoOneMaxMutation object
00064     //  varType anyVariable;               // for example ...
00065 // END   Private data of an eoOneMaxMutation object
00066 };
00067 
00068 #endif

Generated on Thu Apr 19 11:02:27 2007 for EO by  doxygen 1.4.7