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
39
trunk/paradiseo-moeo/src/moeoGenerationalReplacement.h
Normal file
39
trunk/paradiseo-moeo/src/moeoGenerationalReplacement.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
// -*- 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_*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue