java.lang.Object
org.moeaframework.core.operator.TypeSafeMutation<Subset>
org.moeaframework.core.operator.subset.Add
All Implemented Interfaces:
Configurable, Mutation, Variation

public class Add extends TypeSafeMutation<Subset>
Add mutation operator. Randomly add a non-member to the subset.

This operator is type-safe.

  • Constructor Details

    • Add

      public Add()
      Constructs an add mutation operators with the default settings.
    • Add

      public Add(double probability)
      Constructs an add 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(Subset subset)
      Mutates the specified subset using the add mutation operator.
      Specified by:
      mutate in class TypeSafeMutation<Subset>
      Parameters:
      subset - the subset to be mutated