Class MutateDoubleUniform

All Implemented Interfaces:
Operator<DoubleGenotype>, Mutate<DoubleGenotype>
Direct Known Subclasses:
MutateDoubleNonUniform

public class MutateDoubleUniform extends MutateDoubleElementwise
The MutateDoubleUniform uniformly mutates a DoubleGenotype elementwise.
  • Field Details

    • perturbation

      protected final double perturbation
  • Constructor Details

    • MutateDoubleUniform

      @Inject public MutateDoubleUniform(Rand random, NormalizeDouble normalize, double perturbation)
      Constructs a MutateDoubleUniform.
      Parameters:
      random - the random number generator
      normalize - the normalize operator
      perturbation - the perturbation index
  • Method Details

    • mutateElement

      protected double mutateElement(double x, double lb, double ub, double p)
      Description copied from class: MutateDoubleElementwise
      Mutate one element of the list.
      Specified by:
      mutateElement in class MutateDoubleElementwise
      Parameters:
      x - the element
      lb - the lower bound
      ub - the upper bound
      p - the mutation rate
      Returns:
      the mutated element