public class MutatePermutationMixed extends Object implements MutatePermutation
Mutate for the PermutationGenotype. Randomly selects between
MutatePermutationSwap, MutatePermutationInsert, and
MutatePermutationRevert.
| Constructor and Description |
|---|
MutatePermutationMixed(MutatePermutationSwap swap,
MutatePermutationInsert insert,
MutatePermutationRevert revert,
Rand random)
Constructs a new
MutatePermutation with the given mutation rate. |
| Modifier and Type | Method and Description |
|---|---|
void |
mutate(PermutationGenotype<?> genotype,
double p)
Performs a mutation for a
Genotype. |
@Inject public MutatePermutationMixed(MutatePermutationSwap swap, MutatePermutationInsert insert, MutatePermutationRevert revert, Rand random)
MutatePermutation with the given mutation rate.swap - the swap mutateinsert - the insert mutaterevert - the revert mutaterandom - the random number generatorpublic void mutate(PermutationGenotype<?> genotype, double p)
MutateGenotype.mutate in interface Mutate<PermutationGenotype<?>>genotype - the genotype to be mutatedp - the mutation rate