new indent, mo_roulette to implement in selectors

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@218 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
legrand 2007-04-13 13:12:13 +00:00
commit f20b1a21b4

View file

@ -20,16 +20,16 @@
* Selection strategy that selects ONE individual by using roulette wheel process. * Selection strategy that selects ONE individual by using roulette wheel process.
*/ */
template < class MOEOT > template < class MOEOT >
class moeoRouletteSelect:public moeoSelectOne <MOEOT> class moeoRouletteSelect:public moeoSelectOne <MOEOT>
{ {
public: public:
/** /**
* Full Ctor. * Full Ctor.
* @param _comparator the comparator (used to compare 2 individuals) * @param _comparator the comparator (used to compare 2 individuals)
* @param _tSize the number of individuals in the tournament (default: 2) * @param _tSize the number of individuals in the tournament (default: 2)
*/ */
moeoRouletteSelect (moeoComparator < MOEOT > &_comparator, unsigned _tSize = 2): moeoRouletteSelect (moeoComparator < MOEOT > &_comparator, unsigned _tSize = 2):
comparator (_comparator), tSize (_tSize) comparator (_comparator), tSize (_tSize)
{ {
@ -60,21 +60,21 @@ public:
} }
} }
/** /**
* Apply the tournament to the given population * Apply the tournament to the given population
*/ */
const MOEOT & operator () (const eoPop < MOEOT > &_pop) const MOEOT & operator () (const eoPop < MOEOT > &_pop)
{ {
// use the selector // use the selector
return mo_roulette_wheel(_pop,total); //comparator ?? return mo_roulette_wheel(_pop,total); //comparator ??
} }
protected: protected:
moeoComparator < MOEOT > &comparator; moeoComparator < MOEOT > &comparator;
double & total; double & total;
}; };