Cartesian genotype: one point crossover operator. More...
#include <CartesianCrsOnePoint.h>
Public Member Functions | |
bool | mate (GenotypeP gen1, GenotypeP gen2, GenotypeP child) |
bool | initialize (StateP) |
Initialize crossover operator. Called before first crossover operation. | |
void | registerParameters (StateP) |
Register parameters with the system. Called before CrossoverOp::initialize. |
Cartesian genotype: one point crossover operator.
Definition at line 11 of file CartesianCrsOnePoint.h.
bool cart::CartesianCrsOnePoint::mate | ( | GenotypeP | gen1, | |
GenotypeP | gen2, | |||
GenotypeP | child | |||
) | [virtual] |
Crossing point is determined randomly between all integer values in genotype. Left side of one parent from beginning of genotype until crossing point and right side of second parent from crossing point until the end of genotype become child genotype. Order of sides taken in child genotype is randomly chosen.
Implements CrossoverOp.
Definition at line 22 of file CartesianCrsOnePoint.cpp.