rm fit and div, replace constructors and indent

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

View file

@ -17,32 +17,25 @@
#include <eoRandomSelect.h>
/**
* Selection strategy that selects only one element randomly from a whole population. Neither the fitness nor the diversity of the individuals is required here.
* Selection strategy that selects only one element randomly from a whole population.
*/
template < class MOEOT > class moeoRandomSelect:public moeoSelectOne < MOEOT >, public eoRandomSelect <MOEOT >
{
public:
/**
* Ctor.
*/
moeoRandomSelect(){}
/**
* Do nothing: we don't need to evaluate the fitness and the diversity; we only select one individual randomly.
*/
void setup (eoPop < MOEOT > &_pop)
{
// nothing to do
}
/**
* Ctor.
*/
moeoRandomSelect(){}
/**
* Return one individual at random.
*/
const MOEOT & operator () (const eoPop < MOEOT > &_pop)
{
eoRandomSelect < MOEOT >::operator ()(_pop);
}
/**
* Return one individual at random by using an eoRandomSelect.
*/
const MOEOT & operator () (const eoPop < MOEOT > &_pop)
{
eoRandomSelect < MOEOT >::operator ()(_pop);
}
};