From f9d9271618a08f90d7911d969b4159f4392c6a70 Mon Sep 17 00:00:00 2001 From: legrand Date: Fri, 13 Apr 2007 13:02:47 +0000 Subject: [PATCH] rm fit and div, replace constructors and indent git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@215 331e1502-861f-0410-8da2-ba01fb791d7f --- .../paradiseo-moeo-1.0/src/moeoRandomSelect.h | 33 ++++++++----------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/branches/paradiseo-moeo-1.0/src/moeoRandomSelect.h b/branches/paradiseo-moeo-1.0/src/moeoRandomSelect.h index 892a47708..3c97aff2e 100644 --- a/branches/paradiseo-moeo-1.0/src/moeoRandomSelect.h +++ b/branches/paradiseo-moeo-1.0/src/moeoRandomSelect.h @@ -17,32 +17,25 @@ #include /** - * 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 { 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); + } };