java.lang.Object
dev.civl.gmc.RandomTransitionChooser<STATE,TRANSITION>
- Type Parameters:
STATE- the type for the states of the transition systemTRANSITION- the type for the transitions of the transition system
- All Implemented Interfaces:
TransitionChooser<STATE,TRANSITION>
public class RandomTransitionChooser<STATE,TRANSITION>
extends Object
implements TransitionChooser<STATE,TRANSITION>
An implementation of
TransitionChooser in which a transition is
chosen randomly from the full set of the enabled transitions enabled at a
state.-
Constructor Summary
ConstructorsConstructorDescriptionRandomTransitionChooser(EnablerIF<STATE, TRANSITION> enabler) RandomTransitionChooser(EnablerIF<STATE, TRANSITION> enabler, long seed) -
Method Summary
Modifier and TypeMethodDescriptionchooseEnabledTransition(STATE state) Using some protocol, chooses one of the transitions enabled at the given state.longgetSeed()
-
Constructor Details
-
RandomTransitionChooser
-
RandomTransitionChooser
-
-
Method Details
-
chooseEnabledTransition
Description copied from interface:TransitionChooserUsing some protocol, chooses one of the transitions enabled at the given state. If there are no enabled transitions, returns null.- Specified by:
chooseEnabledTransitionin interfaceTransitionChooser<STATE,TRANSITION> - Parameters:
state- a state- Returns:
- a transition enabled at that state, or null if there is none
- Throws:
MisguidedExecutionException- if a transition cannot be selected for some reason
-
getSeed
public long getSeed()
-