public class NeighborPermutationMixed extends java.lang.Object implements NeighborPermutation
Randomly selects between NeighborPermutationSwap
,
NeighborPermutationInsert
, and NeighborPermutationRevert
.
Modifier and Type | Field and Description |
---|---|
protected NeighborPermutationInsert |
insert |
protected java.util.Random |
random |
protected NeighborPermutationRevert |
revert |
protected NeighborPermutationSwap |
swap |
Constructor and Description |
---|
NeighborPermutationMixed(NeighborPermutationSwap swap,
NeighborPermutationInsert insert,
NeighborPermutationRevert revert,
org.opt4j.core.common.random.Rand random)
Constructs a
NeighborPermutationMixed operator for the
PermutationGenotype . |
Modifier and Type | Method and Description |
---|---|
void |
neighbor(org.opt4j.core.genotype.PermutationGenotype<?> genotype)
Moves the
Genotype to a neighbor. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOperatorType
protected final java.util.Random random
protected final NeighborPermutationSwap swap
protected final NeighborPermutationInsert insert
protected final NeighborPermutationRevert revert
@Inject public NeighborPermutationMixed(NeighborPermutationSwap swap, NeighborPermutationInsert insert, NeighborPermutationRevert revert, org.opt4j.core.common.random.Rand random)
NeighborPermutationMixed
operator for the
PermutationGenotype
.swap
- the swap permutationinsert
- the insert permutationrevert
- the revert permutationrandom
- the random number generatorpublic void neighbor(org.opt4j.core.genotype.PermutationGenotype<?> genotype)
Neighbor
Genotype
to a neighbor.