Class SwapMutation
java.lang.Object
net.bmahe.genetics4j.core.spec.mutation.SwapMutation
- All Implemented Interfaces:
MutationPolicy
- Direct Known Subclasses:
ImmutableSwapMutation
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
check()
abstract boolean
abstract int
numSwap()
static SwapMutation
of
(double populationMutationProbability, int numSwap, boolean isNumSwapFixed) Construct a new immutableSwapMutation
instance.abstract double
-
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 immutableSwapMutation
instance.- Parameters:
populationMutationProbability
- The value for thepopulationMutationProbability
attributenumSwap
- The value for thenumSwap
attribute- Returns:
- An immutable SwapMutation instance
-