merge ParadisEO-MOEO v-1.0
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@400 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
d46e17d10a
commit
8b7d5260fb
724 changed files with 63305 additions and 2757 deletions
|
|
@ -1,54 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// moeoArchiveUpdater.h
|
||||
// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007
|
||||
/*
|
||||
This library...
|
||||
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef MOEOARCHIVEUPDATER_H_
|
||||
#define MOEOARCHIVEUPDATER_H_
|
||||
|
||||
#include <eoPop.h>
|
||||
#include <utils/eoUpdater.h>
|
||||
#include <moeoArchive.h>
|
||||
|
||||
/**
|
||||
* This class allows to update the archive at each generation with newly found non-dominated solutions.
|
||||
*/
|
||||
template < class MOEOT >
|
||||
class moeoArchiveUpdater : public eoUpdater
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Ctor
|
||||
* @param _arch an archive of non-dominated solutions
|
||||
* @param _pop the main population
|
||||
*/
|
||||
moeoArchiveUpdater(moeoArchive < MOEOT > & _arch, const eoPop < MOEOT > & _pop) : arch(_arch), pop(_pop)
|
||||
{}
|
||||
|
||||
|
||||
/**
|
||||
* Updates the archive with newly found non-dominated solutions contained in the main population
|
||||
*/
|
||||
void operator()() {
|
||||
arch.update(pop);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/** the archive of non-dominated solutions */
|
||||
moeoArchive < MOEOT > & arch;
|
||||
/** the main population */
|
||||
const eoPop < MOEOT > & pop;
|
||||
|
||||
};
|
||||
|
||||
#endif /*MOEOARCHIVEUPDATER_H_*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue