Modifications 22/02/2007

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@183 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
legrand 2007-02-22 15:38:01 +00:00
commit 8312d91a84
19 changed files with 930 additions and 805 deletions

View file

@ -17,10 +17,32 @@
#include <eoPop.h>
/**
* Functor that sets the diversity values of a whole population.
* Functor that sets the diversity values of a whole population
*/
template < class MOEOT >
class moeoDiversityAssignment : public eoUF < eoPop < MOEOT > &, void >
{};
template < class MOEOT > class moeoDiversityAssignment:public eoUF < eoPop < MOEOT > &,
void >
{
};
#endif /*MOEODIVERSITYASSIGNMENT_H_*/
/**
* moeoDummyDiversityAssignment is a moeoDiversityAssignment which gives 0 as the diversity for the whole population.
*/
template < class MOEOT > class moeoDummyDiversityAssignment:public moeoDiversityAssignment <
MOEOT >
{
// main operator
void operator () (eoPop < MOEOT > &_pop)
{
for (int idx = 0; idx < _pop.size (); idx++)
{
// set the diversity to 0
_pop[idx].diversity (0);
}
}
};
#endif /*MOEODIVERSITYASSIGNMENT_H_ */