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
Modifier and TypeFieldDescriptionprotected final NeighborPermutationInsert
protected final Random
protected final NeighborPermutationRevert
protected final NeighborPermutationSwap
-
Constructor Summary
ConstructorDescriptionNeighborPermutationMixed
(NeighborPermutationSwap swap, NeighborPermutationInsert insert, NeighborPermutationRevert revert, Rand random) Constructs aNeighborPermutationMixed
operator for thePermutationGenotype
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
neighbor
(PermutationGenotype<?> genotype) Moves theGenotype
to a neighbor.
-
Field Details
-
random
-
swap
-
insert
-
revert
-
-
Constructor Details
-
NeighborPermutationMixed
@Inject public NeighborPermutationMixed(NeighborPermutationSwap swap, NeighborPermutationInsert insert, NeighborPermutationRevert revert, Rand random) Constructs aNeighborPermutationMixed
operator for thePermutationGenotype
.- Parameters:
swap
- the swap permutationinsert
- the insert permutationrevert
- the revert permutationrandom
- the random number generator
-
-
Method Details