moeoCombinedLS.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
00002 
00003 //-----------------------------------------------------------------------------
00004 // moeoCombinedLS.h
00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007
00006 /*
00007     This library...
00008 
00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
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 /*MOEOCOMBINEDLS_H_*/

Generated on Fri Jul 6 09:41:04 2007 for ParadisEO-MOEO by  doxygen 1.4.7