public abstract class CrossoverDoubleElementwise extends CrossoverDouble
CrossoverDoubleElementwise
can be used to derive
CrossoverDouble
classOperators that can work element-wise on the
double vectors.normalize, random
Constructor and Description |
---|
CrossoverDoubleElementwise(NormalizeDouble normalize,
org.opt4j.core.common.random.Rand random)
Constructs a new
CrossoverDoubleElementwise . |
Modifier and Type | Method and Description |
---|---|
abstract Pair<java.lang.Double> |
crossover(double x,
double y)
Performs a crossover with two double values.
|
protected void |
crossover(java.util.List<java.lang.Double> p1,
java.util.List<java.lang.Double> p2,
java.util.List<java.lang.Double> o1,
java.util.List<java.lang.Double> o2)
Performs a crossover of two parent
Genotype s that
consist of double vectors. |
crossover
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOperatorType
public CrossoverDoubleElementwise(NormalizeDouble normalize, org.opt4j.core.common.random.Rand random)
CrossoverDoubleElementwise
.normalize
- the normalize operatorrandom
- the random number generatorprotected void crossover(java.util.List<java.lang.Double> p1, java.util.List<java.lang.Double> p2, java.util.List<java.lang.Double> o1, java.util.List<java.lang.Double> o2)
CrossoverDouble
Genotype
s that
consist of double vectors.crossover
in class CrossoverDouble
p1
- the first parentp2
- the second parento1
- the first offspringo2
- the second offspringpublic abstract Pair<java.lang.Double> crossover(double x, double y)
x
- the first valuey
- the second value