Interface Variation

All Superinterfaces:
Configurable, Named
All Known Subinterfaces:
Mutation
All Known Implementing Classes:
AbstractCompoundVariation, AdaptiveMetropolis, AdaptiveMultimethodVariation, Add, BitFlip, CompoundMutation, CompoundVariation, DifferentialEvolutionVariation, GrammarCrossover, GrammarMutation, HUX, Insertion, MultiParentVariation, OnePointCrossover, PCX, PM, PMX, PointMutation, Remove, Replace, SBX, SelfAdaptiveNormalVariation, SPX, SSX, SubtreeCrossover, Swap, TwoPointCrossover, TypeSafeCrossover, TypeSafeMutation, UM, UNDX, UniformCrossover

public interface Variation extends Configurable, Named
Interface for variation operators. Variation operators manipulate one or more existing solutions, called parents, to produce one or more new solutions, called children or offspring.

Variation operators should include the TypeSafe annotation when appropriate.

  • Method Summary

    Modifier and Type
    Method
    Description
    evolve(Solution[] parents)
    Evolves one or more parent solutions (specified by getArity) and produces one or more child solutions.
    int
    Returns the number of solutions that must be supplied to the evolve method.
    Returns the name of this variation operator.

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

    applyConfiguration, getConfiguration
  • Method Details

    • getName

      String getName()
      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.
      Specified by:
      getName in interface Named
      Returns:
      the name of this variation operator
    • getArity

      int getArity()
      Returns the number of solutions that must be supplied to the evolve method.
      Returns:
      the number of solutions that must be supplied to the evolve method
    • evolve

      Solution[] evolve(Solution[] parents)
      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.
      Parameters:
      parents - the array of parent solutions
      Returns:
      an array of child solutions
      Throws:
      IllegalArgumentException - if an incorrect number of parents was supplied (parents.length != getArity())