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
ConstructorsConstructorDescriptionCrossoverDoubleElementwise(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:CrossoverDoublePerforms a crossover of two parentGenotypes that consist of double vectors.- Specified by:
crossoverin 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
-