Package org.opt4j.operator.neighbor
Class NeighborPermutationRevert
java.lang.Object
org.opt4j.operator.neighbor.NeighborPermutationRevert
- All Implemented Interfaces:
Operator<PermutationGenotype<?>>,Neighbor<PermutationGenotype<?>>,NeighborPermutation
Neighbor for the PermutationGenotype. Reverts a sublist.
Given a permutation 1 2 3 4 5 6 7 8, this might result in
1 2 7 6 5 4 3 8.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNeighborPermutationRevert(Rand random) Constructs aNeighborPermutationRevertoperator for thePermutationGenotype. -
Method Summary
Modifier and TypeMethodDescriptionvoidneighbor(PermutationGenotype<?> genotype) Moves theGenotypeto a neighbor.
-
Field Details
-
random
-
-
Constructor Details
-
NeighborPermutationRevert
Constructs aNeighborPermutationRevertoperator for thePermutationGenotype.- Parameters:
random- the random number generator
-
-
Method Details