paradiseo/trunk/paradiseo-moeo/src/moeoGenerationalReplacement.h
liefooga 5df71ee73a new version
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@267 331e1502-861f-0410-8da2-ba01fb791d7f
2007-04-17 15:53:56 +00:00

39 lines
1.2 KiB
C++

// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
//-----------------------------------------------------------------------------
// moeoGenerationalReplacement.h
// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007
/*
This library...
Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
*/
//-----------------------------------------------------------------------------
#ifndef MOEOGENERATIONALREPLACEMENT_H_
#define MOEOGENERATIONALREPLACEMENT_H_
#include <eoReplacement.h>
#include <moeoReplacement.h>
/**
* Generational replacement: only the new individuals are preserved.
*/
template < class MOEOT >
class moeoGenerationalReplacement : public moeoReplacement < MOEOT >, public eoGenerationalReplacement < MOEOT >
{
public:
/**
* Swaps _parents and _offspring
* @param _parents the parents population
* @param _offspring the offspring population
*/
void operator()(eoPop < MOEOT > & _parents, eoPop < MOEOT > & _offspring)
{
eoGenerationalReplacement < MOEOT >::operator ()(_parents, _offspring);
}
};
#endif /*MOEOGENERATIONALREPLACEMENT_H_*/