Class MutateDouble

  • All Implemented Interfaces:
    org.opt4j.core.optimizer.Operator<org.opt4j.core.genotype.DoubleGenotype>, Mutate<org.opt4j.core.genotype.DoubleGenotype>
    Direct Known Subclasses:
    MutateDoubleElementwise

    public abstract class MutateDouble
    extends java.lang.Object
    implements Mutate<org.opt4j.core.genotype.DoubleGenotype>
    Mutate for the DoubleGenotype.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void mutate​(org.opt4j.core.genotype.DoubleGenotype genotype, double p)
      Performs a mutation for a Genotype.
      protected abstract void mutateList​(org.opt4j.core.genotype.DoubleGenotype vector, double p)
      The mutate internal function.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • random

        protected final java.util.Random random
    • Constructor Detail

      • MutateDouble

        @Inject
        public MutateDouble​(org.opt4j.core.common.random.Rand random,
                            NormalizeDouble normalize)
        Constructs a MutateDouble.
        Parameters:
        random - the random number generator
        normalize - the normalizer
    • Method Detail

      • mutate

        public void mutate​(org.opt4j.core.genotype.DoubleGenotype genotype,
                           double p)
        Description copied from interface: Mutate
        Performs a mutation for a Genotype.
        Specified by:
        mutate in interface Mutate<org.opt4j.core.genotype.DoubleGenotype>
        Parameters:
        genotype - the genotype to be mutated
        p - the mutation rate
      • mutateList

        protected abstract void mutateList​(org.opt4j.core.genotype.DoubleGenotype vector,
                                           double p)
        The mutate internal function.
        Parameters:
        vector - the vector of double values
        p - the mutation rate