Package es.urjc.etsii.grafo.shake
Class Shake<S extends Solution<S,I>,I extends Instance>
java.lang.Object
es.urjc.etsii.grafo.shake.Shake<S,I>
- Type Parameters:
S
- Solution classI
- Instance class
- Direct Known Subclasses:
DestroyRebuild
,Example__RNAME__Shake
,RandomMoveShake
,Shake.NullShake
Different ways to shake a solution, RandomShake for a reference implementation
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Shake
public Shake()
-
-
Method Details
-
shake
Shake the solution. Use k to calculate how powerful the shake should be in your implementation. Can be as simple as number of elements to remove, or to swap. Whatever you want.- Parameters:
solution
- Solution to shakek
- shake strength- Returns:
- shaken solution. Shaken, not stirred.
-
nul
Create a no operation shake method Returns the solution immediately without executing any operation- Type Parameters:
S
- Solution classI
- Instance class- Returns:
- Null shake method
-