- Main Page
- Classes
- Files

- File List

# OptFrame/Heuristic/EvolutionaryAlgorithms/Crossover.hpp

    00001 #ifndef OPTFRAME_CROSSOVER_HPP_
    00002 #define OPTFRAME_CROSSOVER_HPP_
    00003
    00004 #include "../../Solution.hpp"
    00005 #include "../../Evaluation.hpp"
    00006
    00007 //#include "../../Population.hpp"
    00008
    00009 template<class R, class M>
    00010 class Crossover
    00011 {
    00012 protected:
    00013
    00014    typedef Solution<R> chromossome;
    00015    //typedef vector<chromossome*> Population;
    00016    typedef vector<Evaluation<M>*> FitnessValues;
    00017
    00018 public:
    00019
    00020    //virtual pair<chromossome &, chromossome *>& offspring(chromossome&, chromossome&) = 0;
    00021
    00022    virtual pair<chromossome &, chromossome *>
    00023    & offspring(const chromossome&, const chromossome&) const = 0;
    00024
    00025    pair<chromossome &, chromossome *>& offspring(pair<const chromossome&, const chromossome&>& off) const
    00026    {
    00027       return offspring(off.first, off.second);
    00028    }
    00029
    00030 };
    00031
    00032 #endif /*OPTFRAME_CROSSOVER_HPP_*/

All Classes Functions