eoGlobalBestInit.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
00002 
00003 //-----------------------------------------------------------------------------
00004 // eoGlobalBestInit.h
00005 // (c) OPAC 2007
00006 /*
00007     Contact: paradiseo-help@lists.gforge.inria.fr
00008  */
00009 //-----------------------------------------------------------------------------
00010 
00011 #ifndef _EOGLOBALBESTINIT_H
00012 #define _EOGLOBALBESTINIT_H
00013 
00014 //-----------------------------------------------------------------------------
00015 #include <eoPop.h>
00016 #include <eoParticleArchive.h>
00017 //-----------------------------------------------------------------------------
00018 
00020 template < class POT > class eoGlobalBestInit:public eoUF < eoPop<POT> &, void >{};
00021 
00022 
00027 template < class POT > class eoBestOfAllInit:public eoGlobalBestInit <POT>
00028 {
00029 public:
00030 
00034     eoBestOfAllInit (eoSingleParticleArchive < POT > &_archive):archive (_archive) {}
00035 
00036     void operator  () (eoPop < POT > &_pop)
00037     {
00038         archive.best (_pop.best_element ());
00039     }
00040 
00041 
00042 protected:
00043     eoSingleParticleArchive < POT > &archive;
00044 
00045 };
00046 
00047 #endif /*_EOGLOBALBESTINIT_H */
00048 
00049 

Generated on Thu Apr 19 11:02:27 2007 for EO by  doxygen 1.4.7