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:
parent
303662d978
commit
59395e0352
1 changed files with 2 additions and 5 deletions
|
|
@ -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)
|
||||
{
|
||||
It competitor = _begin + _gen.random(_end - _begin);
|
||||
|
||||
// compare the two individuals by using the comparator
|
||||
if (_comparator(*best, *competitor))
|
||||
|
||||
// best "better" than competitor
|
||||
best=competitor;
|
||||
}
|
||||
|
||||
return best;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue