Package org.opt4j.operator.neighbor
Class NeighborPermutationMixed
java.lang.Object
org.opt4j.operator.neighbor.NeighborPermutationMixed
- All Implemented Interfaces:
Operator<PermutationGenotype<?>>,Neighbor<PermutationGenotype<?>>,NeighborPermutation
Randomly selects between NeighborPermutationSwap,
NeighborPermutationInsert, and NeighborPermutationRevert.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final NeighborPermutationInsertprotected final Randomprotected final NeighborPermutationRevertprotected final NeighborPermutationSwap -
Constructor Summary
ConstructorsConstructorDescriptionNeighborPermutationMixed(NeighborPermutationSwap swap, NeighborPermutationInsert insert, NeighborPermutationRevert revert, Rand random) Constructs aNeighborPermutationMixedoperator for thePermutationGenotype. -
Method Summary
Modifier and TypeMethodDescriptionvoidneighbor(PermutationGenotype<?> genotype) Moves theGenotypeto a neighbor.
-
Field Details
-
random
-
swap
-
insert
-
revert
-
-
Constructor Details
-
NeighborPermutationMixed
@Inject public NeighborPermutationMixed(NeighborPermutationSwap swap, NeighborPermutationInsert insert, NeighborPermutationRevert revert, Rand random) Constructs aNeighborPermutationMixedoperator for thePermutationGenotype.- Parameters:
swap- the swap permutationinsert- the insert permutationrevert- the revert permutationrandom- the random number generator
-
-
Method Details