- Main Page
- Classes
- Files

- Search for |

# 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 <moeoArchive.h>
    00017 #include <moeoLS.h>
    00018
    00023 template < class MOEOT, class Type >
    00024 class moeoCombinedLS : public moeoLS < MOEOT, Type >
    00025 {
    00026 public:
    00027
    00032     moeoCombinedLS(moeoLS < MOEOT, Type > & _first_mols)
    00033     {
    00034         combinedLS.push_back (& _first_mols);
    00035     }
    00036
    00041     void add(moeoLS < MOEOT, Type > & _mols)
    00042     {
    00043         combinedLS.push_back(& _mols);
    00044     }
    00045
    00052     void operator () (Type _type, moeoArchive < MOEOT > & _arch)
    00053     {
    00054         for (unsigned i=0; i<combinedLS.size(); i++)
    00055             combinedLS[i] -> operator()(_type, _arch);
    00056     }
    00057
    00058
    00059 private:
    00060
    00062     std::vector< moeoLS < MOEOT, Type > * >  combinedLS;
    00063
    00064 };
    00065
    00066 #endif /*MOEOCOMBINEDLS_H_*/