public abstract class CrossoverListXPoint<G extends org.opt4j.core.genotype.ListGenotype<?>> extends java.lang.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
.
Modifier and Type | Field and Description |
---|---|
protected java.util.Random |
random |
protected int |
x |
Constructor and Description |
---|
CrossoverListXPoint(int x,
org.opt4j.core.common.random.Rand random)
Constructs a
CrossoverListXPoint . |
Modifier and Type | Method and Description |
---|---|
Pair<G> |
crossover(G p1,
G p2)
Performs a crossover for two
Genotype parents. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOperatorType
@Inject public CrossoverListXPoint(int x, org.opt4j.core.common.random.Rand random)
CrossoverListXPoint
.x
- the number of crossover pointsrandom
- the random number generator