git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1328 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
ba492a2154
commit
6a3cdb4910
3 changed files with 10 additions and 9 deletions
|
|
@ -129,7 +129,7 @@ public:
|
|||
/**
|
||||
* Ctor with a crossover, a mutation and their corresponding rates.
|
||||
* @param _continuator stopping criteria
|
||||
* @param _eval evaluation function
|
||||
popEval * @param _eval evaluation function
|
||||
* @param _op general operator
|
||||
* @param _archive archive
|
||||
* @param _k the k-ieme distance used to fixe diversity
|
||||
|
|
@ -241,14 +241,16 @@ class eoDummyTransform : public eoTransform<MOEOT>
|
|||
eoPopLoopEval < MOEOT > loopEval;
|
||||
/** evaluation function used to evaluate the whole population */
|
||||
eoPopEvalFunc < MOEOT > & popEval;
|
||||
/**archive*/
|
||||
moeoArchive < MOEOT >& archive;
|
||||
/** selectMany */
|
||||
eoSelectMany <MOEOT> selectMany;
|
||||
/** select Transform*/
|
||||
eoSelectTransform <MOEOT> selectTransform;
|
||||
/** binary tournament selection */
|
||||
moeoSelectFromPopAndArch < MOEOT > select;
|
||||
/**SelectOne*/
|
||||
moeoDetTournamentSelect < MOEOT > defaultSelect;
|
||||
/** binary tournament selection */
|
||||
moeoSelectFromPopAndArch < MOEOT > select;
|
||||
/** fitness assignment used in NSGA-II */
|
||||
moeoDominanceCountRankingFitnessAssignment < MOEOT > fitnessAssignment;
|
||||
/** diversity assignment used in NSGA-II */
|
||||
|
|
@ -267,8 +269,7 @@ class eoDummyTransform : public eoTransform<MOEOT>
|
|||
eoBreed < MOEOT > & breed;
|
||||
/**distance*/
|
||||
moeoEuclideanDistance < MOEOT > dist;
|
||||
/**archive*/
|
||||
moeoArchive < MOEOT >& archive;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -141,12 +141,12 @@ public:
|
|||
*/
|
||||
void operator()(const eoPop < MOEOT > & _pop)
|
||||
{
|
||||
unsigned int i=0;
|
||||
unsigned int i;
|
||||
unsigned int foo=0;
|
||||
|
||||
//Creation of the vector that contains minimal pop's informations
|
||||
std::vector<struct refpop> copy_pop(_pop.size());
|
||||
for (i;i<_pop.size(); i++)
|
||||
for (i=0;i<_pop.size(); i++)
|
||||
{
|
||||
copy_pop[i].index=i;
|
||||
copy_pop[i].fitness=_pop[i].fitness();
|
||||
|
|
@ -250,7 +250,7 @@ public:
|
|||
for (l=0; l<matrice.size(); l++)
|
||||
{
|
||||
it=matrice[l].begin();
|
||||
while ((*it).first != tmp2)
|
||||
while ((unsigned int)(*it).first != tmp2)
|
||||
it++;
|
||||
matrice[l].erase(it);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ class moeoDominanceDepthFitnessAssignment : public moeoDominanceBasedFitnessAssi
|
|||
// assign fitness values
|
||||
unsigned int rank = 1;
|
||||
_pop[_pop.size()-1].fitness(rank);
|
||||
for (unsigned int i=_pop.size()-2; i>=0; i--)
|
||||
for (int i=_pop.size()-2; i>=0; i--)
|
||||
{
|
||||
if (_pop[i].objectiveVector() != _pop[i+1].objectiveVector())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue