fix compilation issues
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1460 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
986ae8b9c1
commit
4c667c0dce
2 changed files with 8 additions and 2 deletions
|
|
@ -201,7 +201,7 @@ protected:
|
|||
/** fitness assignment used in NSGA */
|
||||
moeoDominanceDepthFitnessAssignment < MOEOT > fitnessAssignment;
|
||||
/** diversity assignment used in NSGA-II */
|
||||
moeoFrontByFrontCrowdingDiversityAssignment2 < MOEOT > diversityAssignment;
|
||||
moeoFrontByFrontCrowdingDiversityAssignment < MOEOT > diversityAssignment;
|
||||
/** elitist replacement */
|
||||
moeoElitistReplacement < MOEOT > replace;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,11 @@
|
|||
|
||||
#include <comparator/moeoComparator.h>
|
||||
/**
|
||||
* Functor allowing to compare two solutions.referenced by pointers
|
||||
* Functor allowing to compare two solutions.referenced by pointers.
|
||||
* Several MOEO related stuff have to sort populations according some criterion
|
||||
* Instead to do this, we used a vector whose elements are pointers to true individuals
|
||||
*/
|
||||
|
||||
template < class MOEOT >
|
||||
class moeoPtrComparator : public eoBF < const MOEOT *, const MOEOT *, const bool >
|
||||
{
|
||||
|
|
@ -36,11 +39,14 @@ class moeoPtrComparator : public eoBF < const MOEOT *, const MOEOT *, const bool
|
|||
|
||||
*/
|
||||
moeoPtrComparator( moeoComparator<MOEOT> & _cmp) : cmp(_cmp) {}
|
||||
|
||||
/** compare two const individuals */
|
||||
const bool operator() (const MOEOT *ptr1, const MOEOT *ptr2)
|
||||
{
|
||||
return cmp(*ptr1, *ptr2);
|
||||
}
|
||||
|
||||
/** compare two non const individuals */
|
||||
const bool operator() (MOEOT *ptr1, MOEOT *ptr2)
|
||||
{
|
||||
return cmp(*ptr1, *ptr2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue