public class TwoPointCrossover extends java.lang.Object implements Crossover
Implements the two point crossover.
Constructor and Description |
---|
TwoPointCrossover()
Creates an object of the class.
|
Modifier and Type | Method and Description |
---|---|
void |
makeCrossover(Classifier parent1,
Classifier parent2,
Classifier child1,
Classifier child2)
Applies crossover.
|
public TwoPointCrossover()
Creates an object of the class. It does not have to initialize anything.
public void makeCrossover(Classifier parent1, Classifier parent2, Classifier child1, Classifier child2)
Applies crossover. It generates two children.
makeCrossover
in interface Crossover
parent1
- is the first parent.parent2
- is the second parentchild1
- is the first childchild2
- is the second child.