public abstract class CrossoverListRate<G extends ListGenotype<?>> extends 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.
| Constructor and Description |
|---|
CrossoverListRate(double rate,
Rand random)
Constructs a new
CrossoverListRate. |
@Inject
public CrossoverListRate(double rate,
Rand random)
CrossoverListRate.rate - the rate for a crossoverrandom - the random number generatorpublic Pair<G> crossover(G p1, G p2)
CrossoverGenotype parents. The resulting pair
of Genotype offspring is returned.crossover in interface Crossover<G extends ListGenotype<?>>p1 - The first parent genotype for the crossoverp2 - The second parents genotype for the crossover