00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef MOEOCOMBINEDLS_H_
00014 #define MOEOCOMBINEDLS_H_
00015
00016 #include <vector>
00017 #include <algo/moeoLS.h>
00018 #include <archive/moeoArchive.h>
00019
00024 template < class MOEOT, class Type >
00025 class moeoCombinedLS : public moeoLS < MOEOT, Type >
00026 {
00027 public:
00028
00033 moeoCombinedLS(moeoLS < MOEOT, Type > & _first_mols)
00034 {
00035 combinedLS.push_back (& _first_mols);
00036 }
00037
00042 void add(moeoLS < MOEOT, Type > & _mols)
00043 {
00044 combinedLS.push_back(& _mols);
00045 }
00046
00053 void operator () (Type _type, moeoArchive < MOEOT > & _arch)
00054 {
00055 for (unsigned int i=0; i<combinedLS.size(); i++)
00056 combinedLS[i] -> operator()(_type, _arch);
00057 }
00058
00059
00060 private:
00061
00063 std::vector< moeoLS < MOEOT, Type > * > combinedLS;
00064
00065 };
00066
00067 #endif