Modifs in es (crossover added in make_op_es).

Added a dummy selector in eoReandomSelect that does work even with invalid EOs
This commit is contained in:
evomarc 2001-05-21 04:14:36 +00:00
commit 91342e7080
2 changed files with 27 additions and 4 deletions

View file

@ -112,5 +112,31 @@ private:
vector<const EOT*> eoPters;
};
//-----------------------------------------------------------------------------
/** eoNoSelect: returns all individual in order WITHOUT USING FITNESS!!!
* looping back to the beginning when exhasuted
*
*/
//-----------------------------------------------------------------------------
template <class EOT> class eoNoSelect: public eoSelectOne<EOT>
{
public:
/** Ctor
*/
eoNoSelect(): current(0) {}
virtual const EOT& operator()(const eoPop<EOT>& _pop)
{
if (current >= _pop.size())
current=0;
current++;
return _pop[current-1] ;
}
private:
unsigned current;
};
#endif eoRandomSelect_h