public class InsertionCrossover<R extends NAryTree> extends AbstractCrossover<NAryTree>
Constructor and Description |
---|
InsertionCrossover(int crossoverPoints,
org.uncommons.maths.random.Probability crossoverProbability) |
InsertionCrossover(int crossoverPoints,
org.uncommons.maths.random.Probability crossoverProbability,
CentralRegistry registry) |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<NAryTree> |
mate(NAryTree parent1,
NAryTree parent2,
int numberOfCrossoverPoints,
java.util.Random rng)
Swap two nodes between the trees based on alignment move mapping
|
apply
public InsertionCrossover(int crossoverPoints, org.uncommons.maths.random.Probability crossoverProbability)
public InsertionCrossover(int crossoverPoints, org.uncommons.maths.random.Probability crossoverProbability, CentralRegistry registry)
protected java.util.List<NAryTree> mate(NAryTree parent1, NAryTree parent2, int numberOfCrossoverPoints, java.util.Random rng)
mate
in class AbstractCrossover<NAryTree>
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.