Class SwapMutation

java.lang.Object
net.bmahe.genetics4j.core.spec.mutation.SwapMutation
All Implemented Interfaces:
MutationPolicy
Direct Known Subclasses:
ImmutableSwapMutation

@Immutable public abstract class SwapMutation extends Object implements MutationPolicy
  • Constructor Details

    • SwapMutation

      public SwapMutation()
  • Method Details

    • populationMutationProbability

      @Parameter public abstract double populationMutationProbability()
    • numSwap

      @Parameter public abstract int numSwap()
    • isNumSwapFixed

      @Parameter public abstract boolean isNumSwapFixed()
    • check

      @Check protected void check()
    • of

      public static SwapMutation of(double populationMutationProbability, int numSwap, boolean isNumSwapFixed)
      Construct a new immutable SwapMutation instance.
      Parameters:
      populationMutationProbability - The value for the populationMutationProbability attribute
      numSwap - The value for the numSwap attribute
      Returns:
      An immutable SwapMutation instance