|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.henshin.statespace.util.StateSpaceSearch
public class StateSpaceSearch
State space search implementation.
Constructor Summary | |
---|---|
StateSpaceSearch()
|
Method Summary | |
---|---|
boolean |
depthFirst(List<State> states,
boolean reverse)
Perform a depth-first search. |
boolean |
depthFirst(State state,
boolean reverse)
Perform a depth-first search. |
boolean |
depthFirst(StateSpace stateSpace,
boolean reverse)
Perform a depth-first search, starting at the initial states. |
static Path |
findPath(List<State> states)
Find a Path for a given list of states. |
static Path |
findPath(StateSpace stateSpace,
List<String> trace)
Find a Path for a given trace. |
State |
getCurrentState()
Get the current state. |
Path |
getPath()
Get the current path. |
Set<State> |
getVisitedStates()
Get the set of visited states during the last search. |
static List<State> |
removeUnreachableStates(StateSpace stateSpace)
Remove all unreachable states from a state space. |
void |
reset()
Reset this state space search. |
protected boolean |
shouldStop(State current,
Path path)
Visit a state and check whether the search should be stopped. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StateSpaceSearch()
Method Detail |
---|
protected boolean shouldStop(State current, Path path)
current
- Current state.path
- Path from one of the start states to the current state.
true
if the search should stop.public boolean depthFirst(List<State> states, boolean reverse)
states
- Start states.reverse
- Flag indicating if the traversal should be in reverse direction.public boolean depthFirst(StateSpace stateSpace, boolean reverse)
stateSpace
- State space.public boolean depthFirst(State state, boolean reverse)
state
- Start state.public void reset()
public static List<State> removeUnreachableStates(StateSpace stateSpace)
stateSpace
- State space.public static Path findPath(StateSpace stateSpace, List<String> trace)
Path
for a given trace.
stateSpace
- State space.trace
- Trace (list of transition labels).
null
otherwise.public static Path findPath(List<State> states)
Path
for a given list of states.
null
otherwise.public Set<State> getVisitedStates()
public State getCurrentState()
public Path getPath()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |