1#include "../ECF_base.h" 
    2#include "Permutation.h" 
   11    myGenotype_->registerParameter(state, 
"crx.cyclic2", (voidP) 
new double(0), ECF::DOUBLE);
 
   17    voidP sptr = 
myGenotype_->getParameterValue(state, 
"crx.cyclic2");
 
   30    std::map<int, int>  index;
 
   33    j = (int) state_->getRandomizer()->getRandomInteger(p1->getSize());
 
   36        ch->variables[j] = p1->variables[j];
 
   37        num = p2->variables[j];
 
   41        while ((j < (
int) p1->getSize()) && (p1->variables[j] != num)) {
 
   46      for (
int i = 0; i < (int) p1->getSize(); i++) {
 
   48            ch->variables[i] = p2->variables[i];
 
double probability_
probability of usage of this crossover operator
 
GenotypeP myGenotype_
pointer to the Genotype that defines this CrossoverOp
 
bool initialize(StateP)
Initialize crossover operator. Called before first crossover operation.
 
void registerParameters(StateP)
Register parameters with the system. Called before CrossoverOp::initialize.
 
bool mate(GenotypeP gen1, GenotypeP gen2, GenotypeP child)
 
Permutation class - implements genotype as a vector of indices 0..(n-1) (permutation of indices)