Package evo.search.ga.mutators
Class SwapPropertyMutator
- 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
-
- All Implemented Interfaces:
DiscreteAlterer
,io.jenetics.Alterer<DiscreteGene,Double>
- Direct Known Subclasses:
SwapDistanceMutator
,SwapPositionsMutator
public abstract class SwapPropertyMutator extends SwapGeneMutator
- Author:
- jotoh
-
-
Constructor Summary
Constructors Constructor Description SwapPropertyMutator(double probability)
Construct a swap mutator which swaps a component of the genes.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected io.jenetics.MutatorResult<io.jenetics.Chromosome<DiscreteGene>>
mutate(io.jenetics.Chromosome<DiscreteGene> chromosome, double p, Random random)
protected abstract void
swapComponent(io.jenetics.util.MSeq<DiscreteGene> mSeq, int a, int b)
Swap a property of two genes at positions a and b.-
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
-
-
-
-
Method Detail
-
mutate
protected io.jenetics.MutatorResult<io.jenetics.Chromosome<DiscreteGene>> mutate(io.jenetics.Chromosome<DiscreteGene> chromosome, double p, Random random)
- Overrides:
mutate
in classio.jenetics.SwapMutator<DiscreteGene,Double>
-
swapComponent
protected abstract void swapComponent(io.jenetics.util.MSeq<DiscreteGene> mSeq, int a, int b)
Swap a property of two genes at positions a and b.- Parameters:
mSeq
- sequence of genesa
- position ab
- position b
-
-