Modifier and Type | Class and Description |
---|---|
class |
DFAImplEdgeList.EdgeIterableOutgoing
Iterator to iterate over the outgoing edges of a state.
|
Constructor and Description |
---|
DFAImplEdgeList() |
Modifier and Type | Method and Description |
---|---|
int |
addEdge(int source,
short activity)
Adds an edge to the graph.
|
void |
addEdge(int source,
short activity,
int target)
Add an edge to the graph.
|
java.util.BitSet |
getAcceptingStates() |
gnu.trove.list.TShortList |
getActivities() |
int |
getInitialState() |
int |
getNumberOfStates() |
DFAImplEdgeList.EdgeIterableOutgoing |
getOutgoingEdgesIterator(int state)
Get an iterator over the outgoing edges of a state.
|
gnu.trove.list.TIntList |
getSources() |
gnu.trove.list.TIntList |
getTargets() |
boolean |
isAccepting(int state) |
void |
removeOutgoingEdgesOf(int state)
Remove all the outgoing edges of a state.
|
void |
removeStateAndRedirectEdgesTo(int oldTarget,
int newTarget)
Replace all incoming edges of oldTarget and redirect them to newTarget,
and delete all outgoing edges of oldTarget.
|
void |
removeStatesExcept(java.util.BitSet keepStates) |
void |
setAccepting(int state,
boolean accepting) |
int |
step(int state,
short activity) |
java.lang.String |
toDot()
Returns a dot representation of the automaton.
|
java.lang.String |
toString() |
public int getInitialState()
getInitialState
in interface DFA
public void setAccepting(int state, boolean accepting)
setAccepting
in interface DFA
public boolean isAccepting(int state)
isAccepting
in interface DFA
public java.util.BitSet getAcceptingStates()
getAcceptingStates
in interface DFA
public void addEdge(int source, short activity, int target)
DFA
public int addEdge(int source, short activity)
DFA
public void removeStateAndRedirectEdgesTo(int oldTarget, int newTarget)
DFA
removeStateAndRedirectEdgesTo
in interface DFA
public void removeOutgoingEdgesOf(int state)
DFA
removeOutgoingEdgesOf
in interface DFA
public void removeStatesExcept(java.util.BitSet keepStates)
removeStatesExcept
in interface DFA
public java.lang.String toString()
public java.lang.String toDot()
DFA
public DFAImplEdgeList.EdgeIterableOutgoing getOutgoingEdgesIterator(int state)
DFA
getOutgoingEdgesIterator
in interface DFA
public int getNumberOfStates()
getNumberOfStates
in interface DFA
public gnu.trove.list.TIntList getTargets()
getTargets
in interface DFA
public gnu.trove.list.TIntList getSources()
getSources
in interface DFA
public gnu.trove.list.TShortList getActivities()
getActivities
in interface DFA