00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef MOEOHYBRIDLS_H_
00014 #define MOEOHYBRIDLS_H_
00015
00016 #include <eoContinue.h>
00017 #include <eoPop.h>
00018 #include <eoSelect.h>
00019 #include <utils/eoUpdater.h>
00020 #include <algo/moeoLS.h>
00021 #include <archive/moeoArchive.h>
00022
00027 template < class MOEOT >
00028 class moeoHybridLS : public eoUpdater
00029 {
00030 public:
00031
00039 moeoHybridLS (eoContinue < MOEOT > & _term, eoSelect < MOEOT > & _select, moeoLS < MOEOT, MOEOT > & _mols, moeoArchive < MOEOT > & _arch) :
00040 term(_term), select(_select), mols(_mols), arch(_arch)
00041 {}
00042
00043
00047 void operator () ()
00048 {
00049 if (! term (arch))
00050 {
00051
00052 eoPop < MOEOT > selectedSolutions;
00053 select(arch, selectedSolutions);
00054
00055 for (unsigned int i=0; i<selectedSolutions.size(); i++)
00056 {
00057 mols(selectedSolutions[i], arch);
00058 }
00059 }
00060 }
00061
00062
00063 private:
00064
00066 eoContinue < MOEOT > & term;
00068 eoSelect < MOEOT > & select;
00070 moeoLS < MOEOT, MOEOT > & mols;
00072 moeoArchive < MOEOT > & arch;
00073
00074 };
00075
00076 #endif