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

public abstract class CrossoverDoubleElementwise extends CrossoverDouble
The CrossoverDoubleElementwise can be used to derive CrossoverDouble classOperators that can work element-wise on the double vectors.
  • Constructor Details

    • CrossoverDoubleElementwise

      public CrossoverDoubleElementwise(NormalizeDouble normalize, Rand random)
      Constructs a new CrossoverDoubleElementwise.
      Parameters:
      normalize - the normalize operator
      random - the random number generator
  • Method Details

    • crossover

      protected void crossover(List<Double> p1, List<Double> p2, List<Double> o1, List<Double> o2)
      Description copied from class: CrossoverDouble
      Performs a crossover of two parent Genotypes that consist of double vectors.
      Specified by:
      crossover in class CrossoverDouble
      Parameters:
      p1 - the first parent
      p2 - the second parent
      o1 - the first offspring
      o2 - the second offspring
    • crossover

      public abstract Pair<Double> crossover(double x, double y)
      Performs a crossover with two double values.
      Parameters:
      x - the first value
      y - the second value
      Returns:
      the resulting values