public class NeighborPermutationInsert extends java.lang.Object implements NeighborPermutation
Neighbor for the PermutationGenotype
. One element is moved to a
different position.
Given a permutation 1 2 3 4 5 6 7 8
, this might result in
1 2 6 3 4 5 7 8
.
Modifier and Type | Field and Description |
---|---|
protected java.util.Random |
random |
Constructor and Description |
---|
NeighborPermutationInsert(org.opt4j.core.common.random.Rand random)
Constructs a
NeighborPermutationInsert 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
@Inject public NeighborPermutationInsert(org.opt4j.core.common.random.Rand random)
NeighborPermutationInsert
operator for the
PermutationGenotype
.random
- the random number generatorpublic void neighbor(org.opt4j.core.genotype.PermutationGenotype<?> genotype)
Neighbor
Genotype
to a neighbor.