Interface Mutation

All Superinterfaces:
Configurable, Variation
All Known Implementing Classes:
Add, BitFlip, CompoundMutation, GrammarMutation, Insertion, PM, PointMutation, Remove, Replace, SelfAdaptiveNormalVariation, Swap, TypeSafeMutation, UM

public interface Mutation extends Variation
Identifies mutation operators that evolve exactly one parent.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Solution[]
    evolve(Solution[] parents)
    Evolves one or more parent solutions (specified by getArity) and produces one or more child solutions.
    default int
    Returns the number of solutions that must be supplied to the evolve method.
    mutate(Solution parent)
    Mutates the given parent to produce an offspring.

    Methods inherited from interface org.moeaframework.core.configuration.Configurable

    applyConfiguration, getConfiguration

    Methods inherited from interface org.moeaframework.core.Variation

    getName
  • Method Details

    • mutate

      Solution mutate(Solution parent)
      Mutates the given parent to produce an offspring.
      Parameters:
      parent - the parent solution
      Returns:
      the offspring
    • getArity

      default int getArity()
      Description copied from interface: Variation
      Returns the number of solutions that must be supplied to the evolve method.
      Specified by:
      getArity in interface Variation
      Returns:
      the number of solutions that must be supplied to the evolve method
    • evolve

      default Solution[] evolve(Solution[] parents)
      Description copied from interface: Variation
      Evolves one or more parent solutions (specified by getArity) and produces one or more child solutions. By contract, the parents must not be modified. The copy constructor should be used to create copies of the parents with these copies subsequently modified.
      Specified by:
      evolve in interface Variation
      Parameters:
      parents - the array of parent solutions
      Returns:
      an array of child solutions