New style for MOEO
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@788 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
7161febf9c
commit
39709d3d12
103 changed files with 2607 additions and 2521 deletions
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* <moeoDiversityThenFitnessComparator.h>
|
||||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2007
|
||||
* (C) OPAC Team, LIFL, 2002-2007
|
||||
|
|
@ -45,8 +45,8 @@
|
|||
*/
|
||||
template < class MOEOT >
|
||||
class moeoDiversityThenFitnessComparator : public moeoComparator < MOEOT >
|
||||
{
|
||||
public:
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Returns true if _moeo1 < _moeo2 according to their diversity values, then according to their fitness values
|
||||
|
|
@ -55,16 +55,16 @@ public:
|
|||
*/
|
||||
const bool operator()(const MOEOT & _moeo1, const MOEOT & _moeo2)
|
||||
{
|
||||
if (_moeo1.diversity() == _moeo2.diversity())
|
||||
if (_moeo1.diversity() == _moeo2.diversity())
|
||||
{
|
||||
return _moeo1.fitness() < _moeo2.fitness();
|
||||
return _moeo1.fitness() < _moeo2.fitness();
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
return _moeo1.diversity() < _moeo2.diversity();
|
||||
return _moeo1.diversity() < _moeo2.diversity();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#endif /*MOEODIVERSITYTHENFITNESSCOMPARATOR_H_*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue