|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.metasyntactic.math.automata.AbstractFiniteAutomata
Abstract class implementing base functionality for a finite state machine, such as a NondeterministicFiniteAutomata or a DeterministicFiniteAutomata.
Field Summary | |
protected java.util.Set |
acceptStates
F⊆Q is the set of accept states |
protected java.util.Set |
alphabet
Σ is a finite alphabet |
protected java.lang.ref.SoftReference |
cachedTable
|
protected boolean |
decision
The return value of accept if
immedateDecisionPossible |
protected boolean |
immedateDecisionPossible
In certain cases it is possible to know immediately if this machine will accept the string passed to it. |
protected java.lang.Object |
startState
q0∈Q is the start state |
protected java.util.Set |
states
Q is a finite set of states |
protected TransitionFunction |
transitionFunction
δ:Q x Σε→Q is the transition function |
Constructor Summary | |
AbstractFiniteAutomata()
|
Method Summary | |
java.util.Set |
getAcceptStates()
Returns a mutable view of the accept states of this machine. |
java.util.Set |
getAlphabet()
Returns a mutable view of the alphabet of this machine. |
java.lang.Object |
getStartState()
Returns a mutable view of the start state of this machine |
java.util.Set |
getStates()
Returns a mutable view of the states of this machine. |
TransitionFunction |
getTransitionFunction()
Returns a mutable view of the transition function of this machine. |
java.lang.String[][] |
toStateTable()
Returns a convenient view of this FiniteAutomata as a 2 dimensional array. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.metasyntactic.math.automata.FiniteAutomata |
accept |
Field Detail |
protected java.util.Set states
protected java.util.Set alphabet
protected TransitionFunction transitionFunction
protected java.lang.Object startState
protected java.util.Set acceptStates
protected boolean immedateDecisionPossible
true
if we can make
a decision without reading any input. If this field is true then
accept
should return decision
.
decision
protected boolean decision
accept
if
immedateDecisionPossible is true
.
- See Also:
immedateDecisionPossible
protected java.lang.ref.SoftReference cachedTable
Constructor Detail |
public AbstractFiniteAutomata()
Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Set getStates()
public java.util.Set getAlphabet()
public TransitionFunction getTransitionFunction()
public java.lang.Object getStartState()
public java.util.Set getAcceptStates()
public java.lang.String[][] toStateTable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |