diff --git a/eo/src/eoRandomSelect.h b/eo/src/eoRandomSelect.h index c73c6dd8..ada1ac53 100644 --- a/eo/src/eoRandomSelect.h +++ b/eo/src/eoRandomSelect.h @@ -112,5 +112,31 @@ private: vector eoPters; }; +//----------------------------------------------------------------------------- +/** eoNoSelect: returns all individual in order WITHOUT USING FITNESS!!! + * looping back to the beginning when exhasuted + * + */ +//----------------------------------------------------------------------------- + +template class eoNoSelect: public eoSelectOne +{ + public: + /** Ctor + */ + eoNoSelect(): current(0) {} + + virtual const EOT& operator()(const eoPop& _pop) + { + if (current >= _pop.size()) + current=0; + + current++; + return _pop[current-1] ; + } +private: + unsigned current; +}; + #endif eoRandomSelect_h diff --git a/eo/src/es.h b/eo/src/es.h index e4b25a09..360f48e7 100644 --- a/eo/src/es.h +++ b/eo/src/es.h @@ -49,15 +49,12 @@ #include #include // for generic operators #include // Global ES Xover -#include // Local ES Xover +#include // 2-parents ES Xover // the ES-mutations #include #include -// the crossover - to be continued -#include - #endif _es_h // Local Variables: