Package org.opt4j.operator.crossover
Class CrossoverDoubleElementwise
java.lang.Object
org.opt4j.operator.crossover.CrossoverDouble
org.opt4j.operator.crossover.CrossoverDoubleElementwise
- All Implemented Interfaces:
Operator<DoubleGenotype>
,Crossover<DoubleGenotype>
- Direct Known Subclasses:
CrossoverDoubleBLX
,CrossoverDoubleSBX
The
CrossoverDoubleElementwise
can be used to derive
CrossoverDouble
classOperators that can work element-wise on the
double vectors.-
Field Summary
Fields inherited from class org.opt4j.operator.crossover.CrossoverDouble
normalize, random
-
Constructor Summary
ConstructorDescriptionCrossoverDoubleElementwise
(NormalizeDouble normalize, Rand random) Constructs a newCrossoverDoubleElementwise
. -
Method Summary
Methods inherited from class org.opt4j.operator.crossover.CrossoverDouble
crossover
-
Constructor Details
-
CrossoverDoubleElementwise
Constructs a newCrossoverDoubleElementwise
.- Parameters:
normalize
- the normalize operatorrandom
- the random number generator
-
-
Method Details
-
crossover
Description copied from class:CrossoverDouble
Performs a crossover of two parentGenotype
s that consist of double vectors.- Specified by:
crossover
in classCrossoverDouble
- Parameters:
p1
- the first parentp2
- the second parento1
- the first offspringo2
- the second offspring
-
crossover
Performs a crossover with two double values.- Parameters:
x
- the first valuey
- the second value- Returns:
- the resulting values
-