- Main Page
- Classes
- Files
- Related Pages

- Search for |

# moeoCombinedMOLS.h

    00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
    00002
    00003 //-----------------------------------------------------------------------------
    00004 // moeoCombinedMOLS.h
    00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
    00006 /*
    00007     This library...
    00008
    00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
    00010  */
    00011 //-----------------------------------------------------------------------------
    00012
    00013 #ifndef MOEOCOMBINEDMOLS_H_
    00014 #define MOEOCOMBINEDMOLS_H_
    00015
    00016 #include <eoEvalFunc.h>
    00017 #include <moeoArchive.h>
    00018 #include <moeoMOLS.h>
    00019
    00024 template < class EOT > class moeoCombinedMOLS:public moeoMOLS < EOT >
    00025 {
    00026 public:
    00027
    00033 moeoCombinedMOLS (eoEvalFunc < EOT > &_eval, moeoMOLS < EOT > &_first_ls):eval
    00034     (_eval)
    00035   {
    00036     combinedMOLS.push_back (&_first_ls);
    00037   }
    00038
    00043   void add (moeoMOLS < EOT > &_ls)
    00044   {
    00045     combinedMOLS.push_back (&_ls);
    00046   }
    00047
    00054   void operator  () (const EOT & _eo, moeoArchive < EOT > &_arch)
    00055   {
    00056     eval (const_cast < EOT & >(_eo));
    00057     for (unsigned i = 0; i < combinedMOLS.size (); i++)
    00058       combinedMOLS[i]->operator ()(_eo, _arch);
    00059   }
    00060
    00061
    00062 private:
    00063
    00065   eoEvalFunc < EOT > &eval;
    00067   std::vector < moeoMOLS < EOT > *>combinedMOLS;
    00068
    00069 };
    00070
    00071 #endif /*MOEOCOMBINEDMOLS_H_ */