T
- The component type of the lists that are combined.public class ListOrderCrossover<T> extends AbstractCrossover<java.util.List<T>>
Constructor and Description |
---|
ListOrderCrossover()
Creates a cross-over operator with a cross-over probability of 1.
|
ListOrderCrossover(org.uncommons.maths.number.NumberGenerator<org.uncommons.maths.random.Probability> crossoverProbabilityVariable)
Creates a cross-over operator where cross-over may or may not be applied to a
given pair of parents depending on the
crossoverProbability . |
ListOrderCrossover(org.uncommons.maths.random.Probability crossoverProbability)
Creates a cross-over operator with the specified cross-over probability.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<java.util.List<T>> |
mate(java.util.List<T> parent1,
java.util.List<T> parent2,
int numberOfCrossoverPoints,
java.util.Random rng)
Perform cross-over on a pair of parents to generate a pair of offspring.
|
apply
public ListOrderCrossover()
public ListOrderCrossover(org.uncommons.maths.random.Probability crossoverProbability)
crossoverProbability
- The probability that cross-over will be performed
for any given pair.public ListOrderCrossover(org.uncommons.maths.number.NumberGenerator<org.uncommons.maths.random.Probability> crossoverProbabilityVariable)
crossoverProbability
.crossoverProbabilityVariable
- The probability that, once selected,
a pair of parents will be subjected to cross-over rather than
being copied, unchanged, into the output population.protected java.util.List<java.util.List<T>> mate(java.util.List<T> parent1, java.util.List<T> parent2, int numberOfCrossoverPoints, java.util.Random rng)
mate
in class AbstractCrossover<java.util.List<T>>
parent1
- One of two individuals that provides the source material
for generating offspring.parent2
- One of two individuals that provides the source material
for generating offspring.numberOfCrossoverPoints
- The number of cross-overs performed on the
two parents.rng
- A source of randomness used to determine the location of
cross-over points.