"for" with an "if" inside cut in 2 "for" without "if"
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1204 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
ac354f7f9a
commit
dfe22b84e2
3 changed files with 11 additions and 19 deletions
|
|
@ -100,13 +100,10 @@ public:
|
|||
unsigned int j= _pop.size();
|
||||
unsigned int i= archive.size();
|
||||
matrix(archive,_pop);
|
||||
for (unsigned int k=0; k<i+j; k++)
|
||||
{
|
||||
if (k<i)
|
||||
archive[k].fitness(matrix.count(k));
|
||||
else
|
||||
_pop[k-i].fitness(matrix.count(k));
|
||||
}
|
||||
for (unsigned int k=0; k<i; k++)
|
||||
archive[k].fitness(matrix.count(k));
|
||||
for (unsigned int k=i; k<i+j; k++)
|
||||
_pop[k-i].fitness(matrix.count(k));
|
||||
}
|
||||
|
||||
void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec)
|
||||
|
|
|
|||
|
|
@ -119,12 +119,10 @@ public:
|
|||
unsigned int j= archive.size();
|
||||
matrix(archive,_pop);
|
||||
|
||||
for (unsigned int k=0; k<i+j; k++) {
|
||||
if (k<j)
|
||||
archive[k].fitness(countRanking(k));
|
||||
else
|
||||
_pop[k-j].fitness(countRanking(k));
|
||||
}
|
||||
for (unsigned int k=0; k<j; k++)
|
||||
archive[k].fitness(countRanking(k));
|
||||
for (unsigned int k=j; k<i+j; k++)
|
||||
_pop[k-j].fitness(countRanking(k));
|
||||
}
|
||||
|
||||
void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec)
|
||||
|
|
|
|||
|
|
@ -104,13 +104,10 @@ public:
|
|||
unsigned int i= archive.size();
|
||||
unsigned int j= _pop.size();
|
||||
matrix(archive, _pop);
|
||||
for (unsigned int k=0; k<i+j; k++)
|
||||
{
|
||||
if (k<i)
|
||||
for (unsigned int k=0; k<i; k++)
|
||||
archive[k].fitness(-(matrix.rank(k)+start));
|
||||
else
|
||||
_pop[k-i].fitness(-(matrix.rank(k)+start));
|
||||
}
|
||||
for (unsigned int k=i; k<i+j; k++)
|
||||
_pop[k-i].fitness(-(matrix.rank(k)+start));
|
||||
}
|
||||
|
||||
void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue