|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object INFA
This class implements incomplete nondeterministic finite automata
(without epsilon transitions).
The edges going out of a state are implemented in a Queue
(class PairIntQueue
). The automaton itself
is an array of Queues.
Field Summary | |
Alphabet |
alphabet
The alphabet. |
PairIntQueue[] |
edges
The set of edges going out of a state. |
java.util.Set |
initial
The set of initial states. |
int |
nbLetters
|
int |
nbStates
The number of states. |
java.util.Set |
terminal
The set of terminal states. |
Constructor Summary | |
INFA()
|
|
INFA(int n)
|
|
INFA(int n,
Alphabet a)
|
Method Summary | |
void |
addEdge(int p,
char a,
int q)
|
void |
addEdge(int p,
int a,
int q)
|
void |
addTerminal(int p)
|
static INFA |
ex()
|
java.util.LinkedList |
explore(java.util.LinkedList t,
int p,
IDFA b)
Implements the function Explore(t, s, b) which returns the list of sets of half edges realizing the determinization of the NFA. |
boolean |
isTerminal(int p)
|
static void |
main(java.lang.String[] args)
|
java.util.Set[] |
next(java.util.Set s)
Computes a set transition in an INFA. |
IDFA |
toIDFA(int Nmax)
Implements the determinization algorithm. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int nbStates
public int nbLetters
public PairIntQueue[] edges
public java.util.Set initial
public java.util.Set terminal
public Alphabet alphabet
Constructor Detail |
public INFA()
public INFA(int n)
public INFA(int n, Alphabet a)
Method Detail |
public boolean isTerminal(int p)
public void addTerminal(int p)
public void addEdge(int p, char a, int q)
public void addEdge(int p, int a, int q)
public java.lang.String toString()
public static INFA ex()
public java.util.Set[] next(java.util.Set s)
s
- the original set of states
public java.util.LinkedList explore(java.util.LinkedList t, int p, IDFA b)
s
of t
with order p
.
t
- a linked list of sets of states (implemented as TreeSet).p
- the order of the starting set.b
- the resulting DFA.
b
.public IDFA toIDFA(int Nmax)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |