Package org.opt4j.operators.crossover
Class CrossoverListRate<G extends org.opt4j.core.genotype.ListGenotype<?>>
- java.lang.Object
-
- org.opt4j.operators.crossover.CrossoverListRate<G>
-
- All Implemented Interfaces:
org.opt4j.core.optimizer.Operator<G>
,Crossover<G>
- Direct Known Subclasses:
CrossoverBooleanRate
,CrossoverIntegerRate
public abstract class CrossoverListRate<G extends org.opt4j.core.genotype.ListGenotype<?>> extends java.lang.Object implements Crossover<G>
The
CrossoverListRate
performs a crossover onGenotype
objects that are lists of values.A point of crossover of the list is selected with a given
rate
.
-
-
Constructor Summary
Constructors Constructor Description CrossoverListRate(double rate, org.opt4j.core.common.random.Rand random)
Constructs a newCrossoverListRate
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pair<G>
crossover(G p1, G p2)
Performs a crossover for twoGenotype
parents.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opt4j.operators.crossover.Crossover
getOperatorType
-
-
-
-
Constructor Detail
-
CrossoverListRate
@Inject public CrossoverListRate(double rate, org.opt4j.core.common.random.Rand random)
Constructs a newCrossoverListRate
.- Parameters:
rate
- the rate for a crossoverrandom
- the random number generator
-
-