update the use of comparator

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@326 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
liefooga 2007-06-19 07:57:27 +00:00
commit 59395e0352

View file

@ -24,14 +24,11 @@ It mo_deterministic_tournament(It _begin, It _end, unsigned _t_size,moeoComparat
for (unsigned i = 0; i < _t_size - 1; ++i) for (unsigned i = 0; i < _t_size - 1; ++i)
{ {
It competitor = _begin + _gen.random(_end - _begin); It competitor = _begin + _gen.random(_end - _begin);
// compare the two individuals by using the comparator // compare the two individuals by using the comparator
if (_comparator(*best, *competitor)) if (_comparator(*best, *competitor))
// best "better" than competitor // best "better" than competitor
best=competitor; best=competitor;
} }
return best; return best;
} }