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