public abstract class CrossoverListRate<G extends org.opt4j.core.genotype.ListGenotype<?>> extends java.lang.Object implements Crossover<G>
The CrossoverListRate
performs a crossover on
Genotype
objects that are lists of values.
A point of crossover of the list is selected with a given rate
.
Modifier and Type | Field and Description |
---|---|
protected java.util.Random |
random |
protected double |
rate |
Constructor and Description |
---|
CrossoverListRate(double rate,
org.opt4j.core.common.random.Rand random)
Constructs a new
CrossoverListRate . |
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 CrossoverListRate(double rate, org.opt4j.core.common.random.Rand random)
CrossoverListRate
.rate
- the rate for a crossoverrandom
- the random number generator