Package org.opt4j.operator.crossover
Class CrossoverListXPoint<G extends ListGenotype<?>>
java.lang.Object
org.opt4j.operator.crossover.CrossoverListXPoint<G>
- Direct Known Subclasses:
CrossoverBooleanXPoint,CrossoverIntegerXPoint
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
x
protected final int x -
random
-
-
Constructor Details
-
CrossoverListXPoint
Constructs aCrossoverListXPoint.- Parameters:
x- the number of crossover pointsrandom- the random number generator
-
-
Method Details
-
crossover
Description copied from interface:CrossoverPerforms a crossover for twoGenotypeparents. The resulting pair ofGenotypeoffspring is returned.- Specified by:
crossoverin interfaceCrossover<G extends ListGenotype<?>>- Parameters:
p1- The first parent genotype for the crossoverp2- The second parents genotype for the crossover- Returns:
- The resulting pair of offspring genotypes
-