public class ReverseSubsequenceNeighbourhood extends Object implements org.jamesframework.core.search.neigh.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)
Create a random move that reverses a subsequence of the permutation.
|
public ReverseSubsequenceMove getRandomMove(PermutationSolution solution)
getRandomMove
in interface org.jamesframework.core.search.neigh.Neighbourhood<PermutationSolution>
solution
- permutation solution to which the move is to be appliednull
if the permutation contains less than 2 itemspublic List<ReverseSubsequenceMove> getAllMoves(PermutationSolution solution)
getAllMoves
in interface org.jamesframework.core.search.neigh.Neighbourhood<PermutationSolution>
solution
- permutation solution to which the move is to be appliedCopyright © 2015. All rights reserved.