public class ReverseSubsequenceNeighbourhood extends Object implements Neighbourhood<PermutationSolution>
| Constructor and Description |
|---|
ReverseSubsequenceNeighbourhood() |
| Modifier and Type | Method and Description |
|---|---|
List<ReverseSubsequenceMove> |
getAllMoves(PermutationSolution solution)
Create a list of all possible moves that reverse a subsequence of the permutation.
|
ReverseSubsequenceMove |
getRandomMove(PermutationSolution solution,
Random rnd)
Create a random move that reverses a subsequence of the permutation.
|
String |
toString()
Get string indicating neighbourhood type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRandomMovepublic ReverseSubsequenceMove getRandomMove(PermutationSolution solution, Random rnd)
getRandomMove in interface Neighbourhood<PermutationSolution>solution - permutation solution to which the move is to be appliedrnd - source of randomness used to generate random movenull if the permutation contains less
than 2 itemspublic List<ReverseSubsequenceMove> getAllMoves(PermutationSolution solution)
getAllMoves in interface Neighbourhood<PermutationSolution>solution - permutation solution to which the move is to be appliedCopyright © 2016. All rights reserved.