|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectDFA
This class implements deterministic complete finite automata.
The transition function is represented by a double array
next[][]. The set of terminal states is given
by a partition of the set of states
(class Partition).
A state q is terminal if
terminal.blockName[p]=1
(the default value is 0).
| Constructor Summary | |
DFA(int n,
Alphabet a)
creates a DFA with n states and alphabet a. |
|
DFA(int n,
int k)
creates a DFA with n states
and k letters. |
|
| Method Summary | |
static void |
main(java.lang.String[] args)
|
static DFA |
minimize(DFA a,
Minimizer m)
Minimizes the automaton using the method m. |
DFA |
minimize(Minimizer m)
|
int |
next(int p,
java.lang.String w)
returns the state reached from state p after
reading the word w. |
DFA |
quotient(int[] c)
Returns the quotient of the DFA by the partition c |
DFA |
quotient(Partition p)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DFA(int n,
int k)
n states
and k letters.
public DFA(int n,
Alphabet a)
| Method Detail |
public int next(int p,
java.lang.String w)
p after
reading the word w.
p - starting statew - input word (w is not null
public static DFA minimize(DFA a,
Minimizer m)
throws java.lang.Exception
java.lang.Exception
public DFA minimize(Minimizer m)
throws java.lang.Exception
java.lang.Exceptionpublic DFA quotient(int[] c)
c
c - a partition of the state set compatible with the DFA
public DFA quotient(Partition p)
public java.lang.String toString()
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||