java.lang.Object
es.urjc.etsii.grafo.shake.Shake<S,I>
es.urjc.etsii.grafo.shake.RandomMoveShake<S,I>
- Type Parameters:
S- Solution classI- Instance class
-
Nested Class Summary
Nested classes/interfaces inherited from class Shake
Shake.NullShake<S,I> -
Constructor Summary
ConstructorsConstructorDescriptionRandomMoveShake(int ratio, RandomizableNeighborhood<?, S, I> neighborhood) Create a new RandomMoveShakeRandomMoveShake(RandomizableNeighborhood<?, S, I> neighborhood) Create a new RandomMoveShake. -
Method Summary
-
Constructor Details
-
RandomMoveShake
@AutoconfigConstructor public RandomMoveShake(@IntegerParam(min=1,max=1000) int ratio, RandomizableNeighborhood<?, S, I> neighborhood) Create a new RandomMoveShake- Parameters:
ratio- number of moves to execute = ratio * Kneighborhood- neighborhoods to use
-
RandomMoveShake
Create a new RandomMoveShake. Equivalent to RandomMoveShake(1, neighborhoods)- Parameters:
neighborhood- neighborhoods to use
-
-
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. Shake the solution applying random movements from the configured neighborhood -
toString
-