1#include "../ECF_base.h" 
    2#include "FloatingPoint.h" 
   11    myGenotype_->registerParameter(state, 
"crx.blxalpha", (voidP) 
new double(0), ECF::DOUBLE);
 
   12    state->getRegistry()->registerEntry(
"alpha", (voidP) 
new double(0.5), ECF::DOUBLE);
 
   18    voidP sptr = 
myGenotype_->getParameterValue(state, 
"crx.blxalpha");
 
   21    voidP par = state->getRegistry()->getEntry(
"alpha");
 
   22    alpha = *((
double*) par.get());
 
   33    double min, max, a, I, resMin = 0, resMax = 0;
 
   35    for (uint i = 1; i < p1->realValue.size(); i++) {
 
   36        a = state_->getRandomizer()->getRandomDouble();
 
   37         if (p1->realValue[i] < p2->realValue[i]){
 
   38            min = p1->realValue[i];
 
   41            min = p2->realValue[i];
 
   43         if (p1->realValue[i] > p2->realValue[i]){
 
   44            max = p1->realValue[i];
 
   47            max = p2->realValue[i];
 
   50        resMin = min - I * alpha;
 
   51        resMax = max + I * alpha;
 
   52        ch->realValue[i] = resMin + a * fabs(resMax - resMin);
 
double probability_
probability of usage of this crossover operator
 
GenotypeP myGenotype_
pointer to the Genotype that defines this CrossoverOp
 
void registerParameters(StateP)
Register parameters with the system. Called before CrossoverOp::initialize.
 
bool initialize(StateP)
Initialize crossover operator. Called before first crossover operation.
 
bool mate(GenotypeP gen1, GenotypeP gen2, GenotypeP child)
 
FloatingPoint class - implements genotype as a vector of floating point values.