Interface MutationOperator<T>

Type Parameters:
T - The type of object used to represent candidate solutions to the problem.
All Superinterfaces:
All Known Subinterfaces:
IterableMutationOperator<T>, UndoableMutationOperator<T>
All Known Implementing Classes:
AdjacentSwapMutation, BitFlipMutation, BlockInterchangeMutation, BlockMoveMutation, CauchyMutation, CycleAlphaMutation, CycleMutation, DefiniteBitFlipMutation, GaussianMutation, HybridMutation, HybridUndoableMutation, InsertionMutation, RandomValueChangeMutation, ReversalMutation, RotationMutation, ScrambleMutation, SwapMutation, ThreeOptMutation, TwoChangeMutation, UndoableCauchyMutation, UndoableGaussianMutation, UndoableRandomValueChangeMutation, UndoableScrambleMutation, UndoableUniformMutation, UndoableUniformMutation, UndoableUniformScrambleMutation, UniformMutation, UniformMutation, UniformScrambleMutation, WeightedHybridMutation, WeightedHybridUndoableMutation, WindowLimitedBlockMoveMutation, WindowLimitedInsertionMutation, WindowLimitedReversalMutation, WindowLimitedScrambleMutation, WindowLimitedSwapMutation, WindowLimitedUndoableScrambleMutation

public interface MutationOperator<T> extends Splittable<MutationOperator<T>>

Implement the MutationOperator interface to implement a mutation operator for use in simulated annealing, genetic algorithms, and other evolutionary algorithms, and other metaheuristics, that require a way to generate random neighbors of a candidate solution.

If your mutation operator is one in which the inverse operation (i.e., the operation that reverts an object to its previous state from prior to the mutation) can be implemented without substantially affecting the runtime of the mutation itself, then consider implementing the UndoableMutationOperator interface instead, a subinterface of MutationOperator that adds an undo method.

On the other hand, if implementing UndoableMutationOperator.undo(T) would require significant added cost in either time or memory to the mutate(T) method, then consider implementing two versions of your mutation operator, one that implements MutationOperator and a second that implements UndoableMutationOperator. In this way, you can use the first version with metaheuristics that do not utilize the undo method, and the second for those that do.

  • Method Summary

    Modifier and Type
    mutate(T c)
    Mutates a candidate solution to a problem, by randomly modifying its state.

    Methods inherited from interface

  • Method Details

    • mutate

      void mutate(T c)
      Mutates a candidate solution to a problem, by randomly modifying its state. The mutant that is produced is in the local neighborhood of the original candidate solution.
      c - The candidate solution subject to the mutation. This method changes the state of c.