Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages | Search for

# eoOneMaxQuadCrossover.h

    00001
    00006 /*
    00007 Template for simple quadratic crossover operators
    00008 =================================================
    00009
    00010 Quadratic crossover operators modify the both genotypes
    00011 */
    00012
    00013 #ifndef eoOneMaxQuadCrossover_H
    00014 #define eoOneMaxQuadCrossover_H
    00015
    00016 #include <eoOp.h>
    00017
    00025 template<class GenotypeT>
    00026 class eoOneMaxQuadCrossover: public eoQuadOp<GenotypeT>
    00027 {
    00028 public:
    00032 // START eventually add or modify the anyVariable argument
    00033     eoOneMaxQuadCrossover()
    00034     //  eoOneMaxQuadCrossover( varType  _anyVariable) : anyVariable(_anyVariable)
    00035     // END eventually add or modify the anyVariable argument
    00036         {
    00037             // START Code of Ctor of an eoOneMaxEvalFunc object
    00038             // END   Code of Ctor of an eoOneMaxEvalFunc object
    00039         }
    00040
    00042     string className() const { return "eoOneMaxQuadCrossover"; }
    00043
    00049     bool operator()(GenotypeT& _genotype1, GenotypeT & _genotype2)
    00050         {
    00051             bool oneAtLeastIsModified(true);
    00052             // START code for crossover of _genotype1 and _genotype2 objects
    00053
    00060             return oneAtLeastIsModified;
    00061             // END code for crossover of _genotype1 and _genotype2 objects
    00062         }
    00063
    00064 private:
    00065 // START Private data of an eoOneMaxQuadCrossover object
    00066     //  varType anyVariable;               // for example ...
    00067 // END   Private data of an eoOneMaxQuadCrossover object
    00068 };
    00069
    00070 #endif