paradiseo/branches/paradiseo-moeo-1.0/src/selection/moeoRandomSelect.h
liefooga 7c219dbd48 add selection
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@381 331e1502-861f-0410-8da2-ba01fb791d7f
2007-06-26 12:15:06 +00:00

43 lines
1.1 KiB
C++

// -*- 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 <eoRandomSelect.h>
#include <selection/moeoSelectOne.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_ */