|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectEcoRMinimizer
Minimization of an acyclic trim automaton in linear time.
This algorithm, due to D. Revuz, minimizes an acyclic automaton in time
O(n + e), where
n = number of states
e = number of edges.
| Constructor Summary | |
EcoRMinimizer()
|
|
| Method Summary | |
static int |
addStateMin(int p,
int nn,
int[] num,
IDFA a,
IDFA b)
Adds the state nn to the automaton b
(the minimal automaton in construction) as the class of state p
in the original automaton a. |
static IntQueue |
bucketSort(int k,
IntQueue[] bucket,
IntQueue[] lap,
int[][] s,
IntQueue d)
Realizes the bucket sort of the queue of integers d according
to the value of column k in the array of signatures s. |
static void |
computeSignatures(int[] som,
int[][] sig,
int[] num,
IntQueue shl,
IDFA a)
Computes the array of signatures of a list shl of states. |
static boolean |
equalsig(int[] a,
int[] b)
Returns true if the arrays a and b are equal. |
static IntQueue[] |
letterPositions(IntQueue[] pdl,
int J,
int K)
Returns the array of lists of letters at a position. |
static IDFA |
minimize(IDFA a)
The method called to minimize an acyclic trim automaton. |
static IntQueue[] |
positionLetters(int[][] s,
int J)
Returns the array list of positions of letters. |
static IntQueue |
radixSort(int[][] s,
int J)
Lexicographic sort of the array s. |
static int |
renumberStates(int[] e,
int[][] sil,
int nn,
int[] num,
IDFA a,
IDFA b)
Adds states to the minimal automaton in construction b. |
static IntQueue[] |
triParHauteur(int[] h,
IDFA a)
Returns the array sh of queues such that sh[r]
is the queue of states at heigth r. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EcoRMinimizer()
| Method Detail |
public static IntQueue radixSort(int[][] s,
int J)
s. Complexity O(NK).
s - a K by N array.
public static IntQueue bucketSort(int k,
IntQueue[] bucket,
IntQueue[] lap,
int[][] s,
IntQueue d)
d according
to the value of column k in the array of signatures s.
k - the column indexbucket - the array of bucketslap - the array of lists of letters by positions - the array of signaturesd - the list to be sorted
public static IntQueue[] positionLetters(int[][] s,
int J)
s - the array of signatures.
pdl of lists of positions of letters.
pdl[c] is the list of indices k such that s[n][k] = c
for some index n.
public static IntQueue[] letterPositions(IntQueue[] pdl,
int J,
int K)
pdl - the array of lists of positions of letters.J - the size of pdl.K - the size of the result.
lap of lists of letters at a position.
lap[k] is the list of letters c such that s[n][k] = c
for some index n.
public static int addStateMin(int p,
int nn,
int[] num,
IDFA a,
IDFA b)
nn to the automaton b
(the minimal automaton in construction) as the class of state p
in the original automaton a.
p - a state of a.nn - a state of bnum - the array of class numbers
nn + 1.
public static int renumberStates(int[] e,
int[][] sil,
int nn,
int[] num,
IDFA a,
IDFA b)
b.
e - the array of states of asil - the array of signaturesnn - the current number of states of bnum - the array of class numbers
b.
public static void computeSignatures(int[] som,
int[][] sig,
int[] num,
IntQueue shl,
IDFA a)
shl of states.
som - the array of names of states. som[i] is the name of the
i-th state.sig - the array of signatures.num - the array of class numbersshl - the list of states
public static boolean equalsig(int[] a,
int[] b)
a and b are equal.
public static IntQueue[] triParHauteur(int[] h,
IDFA a)
sh of queues such that sh[r]
is the queue of states at heigth r.
h - the array of heigths
public static IDFA minimize(IDFA a)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||