Package evo.search.ga.mutators
Class SwapPositionsMutator
- java.lang.Object
-
- io.jenetics.AbstractAlterer<G,C>
-
- io.jenetics.Mutator<G,C>
-
- io.jenetics.SwapMutator<DiscreteGene,Double>
-
- evo.search.ga.mutators.SwapGeneMutator
-
- evo.search.ga.mutators.SwapPropertyMutator
-
- evo.search.ga.mutators.SwapPositionsMutator
-
- All Implemented Interfaces:
DiscreteAlterer
,io.jenetics.Alterer<DiscreteGene,Double>
public class SwapPositionsMutator extends SwapPropertyMutator
Mutator which swaps whole the positions betweenDiscreteGene
s.
-
-
Constructor Summary
Constructors Constructor Description SwapPositionsMutator(double probability)
Standard probability constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
swapComponent(io.jenetics.util.MSeq<DiscreteGene> mSeq, int a, int b)
Swap the positions of twoDiscreteGene
s in a chromosome sequence ofDiscreteGene
s.-
Methods inherited from class evo.search.ga.mutators.SwapPropertyMutator
mutate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface evo.search.ga.mutators.DiscreteAlterer
probability
-
-
-
-
Constructor Detail
-
SwapPositionsMutator
public SwapPositionsMutator(double probability)
Standard probability constructor. Utilized by theMutatorTableModel
.- Parameters:
probability
- the probability of a position swap
-
-
Method Detail
-
swapComponent
protected void swapComponent(io.jenetics.util.MSeq<DiscreteGene> mSeq, int a, int b)
Swap the positions of twoDiscreteGene
s in a chromosome sequence ofDiscreteGene
s.- Specified by:
swapComponent
in classSwapPropertyMutator
- Parameters:
mSeq
- chromosome sequencea
- integer position a for swapb
- integer position b for swap
-
-