java.lang.Object
org.moeaframework.core.operator.TypeSafeMutation<Permutation>
org.moeaframework.core.operator.permutation.Insertion
All Implemented Interfaces:
Configurable, Mutation, Variation

public class Insertion extends TypeSafeMutation<Permutation>
Insertion mutation operator. Randomly selects an entry in the permutation and inserts it at some other position in the permutation.

This operator is type-safe.

  • Constructor Details

    • Insertion

      public Insertion()
      Constructs an insertion mutation operator with the default settings.
    • Insertion

      public Insertion(double probability)
      Constructs an insertion mutation operator with the specified probability of mutating a variable.
      Parameters:
      probability - the probability of mutating a variable
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Variation
      Returns the name of this variation operator. This name should also be used as the prefix for any parameters. As such, the name should only contain alphanumeric characters, avoid using whitespace and other symbols.
      Returns:
      the name of this variation operator
    • mutate

      public void mutate(Permutation permutation)
      Evolves the specified permutation using the insertion mutation operator.
      Specified by:
      mutate in class TypeSafeMutation<Permutation>
      Parameters:
      permutation - the permutation to be mutated