new version
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@267 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
6a6dab8eff
commit
5df71ee73a
42 changed files with 3554 additions and 824 deletions
42
trunk/paradiseo-moeo/src/moeoRandomSelect.h
Normal file
42
trunk/paradiseo-moeo/src/moeoRandomSelect.h
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// moeoRandomSelect.h
|
||||
// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007
|
||||
/*
|
||||
This library...
|
||||
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef MOEORANDOMSELECT_H_
|
||||
#define MOEORANDOMSELECT_H_
|
||||
|
||||
#include <moeoSelectOne.h>
|
||||
#include <eoRandomSelect.h>
|
||||
|
||||
/**
|
||||
* 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(){}
|
||||
|
||||
|
||||
/**
|
||||
* Return one individual at random by using an eoRandomSelect.
|
||||
*/
|
||||
const MOEOT & operator () (const eoPop < MOEOT > &_pop)
|
||||
{
|
||||
return eoRandomSelect < MOEOT >::operator ()(_pop);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif /*MOEORANDOMSELECT_H_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue