Package org.opt4j.operator.neighbor
Class NeighborPermutationInsert
java.lang.Object
org.opt4j.operator.neighbor.NeighborPermutationInsert
- All Implemented Interfaces:
Operator<PermutationGenotype<?>>
,Neighbor<PermutationGenotype<?>>
,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
.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionNeighborPermutationInsert
(Rand random) Constructs aNeighborPermutationInsert
operator for thePermutationGenotype
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
neighbor
(PermutationGenotype<?> genotype) Moves theGenotype
to a neighbor.
-
Field Details
-
random
-
-
Constructor Details
-
NeighborPermutationInsert
Constructs aNeighborPermutationInsert
operator for thePermutationGenotype
.- Parameters:
random
- the random number generator
-
-
Method Details