BIG update
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@210 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
cd07971ba2
commit
528a149107
27 changed files with 1891 additions and 344 deletions
|
|
@ -64,9 +64,24 @@ public:
|
|||
// problem with the number of objectives
|
||||
throw std::runtime_error("Problem with the number of objectives in moeoFastNonDominatedSortingFitnessAssignment");
|
||||
}
|
||||
// a higher fitness is better, so the values need to be inverted
|
||||
double max = _pop[0].fitness();
|
||||
for (unsigned i=1 ; i<_pop.size() ; i++)
|
||||
{
|
||||
max = std::max(max, _pop[i].fitness());
|
||||
}
|
||||
for (unsigned i=0 ; i<_pop.size() ; i++)
|
||||
{
|
||||
_pop[i].fitness(max - _pop[i].fitness());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void updateByDeleting(eoPop < MOEOT > & _pop, MOEOT & _moeo)
|
||||
{
|
||||
cout << "WARNING : not yet implemented in NDSortingFitAss" << endl;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
/** the objective vector type of the solutions */
|
||||
|
|
@ -83,11 +98,14 @@ private:
|
|||
*/
|
||||
void oneObjective (eoPop < MOEOT > & _pop)
|
||||
{
|
||||
// TO DO !
|
||||
/*
|
||||
std::sort(_pop.begin(), _pop.end(), objComparator);
|
||||
for (unsigned i=0; i<_pop.size(); i++)
|
||||
{
|
||||
_pop[i].fitness(i+1);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue