Added a missing test in the weak elitism

This commit is contained in:
evomarc 2002-08-29 16:44:30 +00:00
commit 746516a675

View file

@ -120,7 +120,7 @@ public:
_parents.sort();
EOT & eoLimit = _parents[elite-1];
unsigned index=0;
while (temp[index++] > eoLimit)
while ( (temp[index++] > eoLimit) && (index < temp.size()) )
toSave++;
if (toSave)
for (unsigned i=0; i<toSave; i++)