public abstract class CrossoverListXPoint<G extends ListGenotype<?>> extends Object implements Crossover<G>
The CrossoverListXPoint performs a crossover on
Genotype objects that are lists of values.
The crossover is performed on x points of the
Genotype.
| Constructor and Description |
|---|
CrossoverListXPoint(int x,
Rand random)
Constructs a
CrossoverListXPoint. |
@Inject
public CrossoverListXPoint(int x,
Rand random)
CrossoverListXPoint.x - the number of crossover pointsrandom - the random number generatorpublic Pair<G> crossover(G p1, G p2)
CrossoverGenotype parents. The resulting pair
of Genotype offspring is returned.crossover in interface Crossover<G extends ListGenotype<?>>p1 - The first parent genotype for the crossoverp2 - The second parents genotype for the crossover