dk.brics.automaton
Class StringUnionOperations
public final
class
StringUnionOperations
extends Object
Operations for building minimal deterministic automata from sets of strings.
The algorithm requires sorted input data, but is very fast (nearly linear with the input size).
Author: Dawid Weiss
Method Summary |
void | add(CharSequence current)
Add another character sequence to this automaton. |
static State | build(CharSequence[] input)
Build a minimal, deterministic automaton from a sorted list of strings. |
StringUnionOperations.State | complete()
Finalize the automaton and return the root state. |
public static final Comparator<CharSequence> LEXICOGRAPHIC_ORDER
Lexicographic order of input sequences.
public void add(CharSequence current)
Add another character sequence to this automaton. The sequence must be
lexicographically larger or equal compared to any previous sequences
added to this automaton (the input must be sorted).
public static
State build(CharSequence[] input)
Build a minimal, deterministic automaton from a sorted list of strings.
public StringUnionOperations.State complete()
Finalize the automaton and return the root state. No more strings can be
added to the builder after this call.
Returns: Root automaton state.
Copyright © 2001-2010 Anders Møller.