public final class FSABuilder extends Object
ConstantArcSizeFSA
(a tradeoff between construction
speed and memory consumption).Modifier and Type | Class and Description |
---|---|
static class |
FSABuilder.InfoEntry
Debug and information constants.
|
Modifier and Type | Field and Description |
---|---|
static Comparator<byte[]> |
LEXICAL_ORDERING
Comparator comparing full byte arrays consistently with
compare(byte[], int, int, byte[], int, int) . |
Constructor and Description |
---|
FSABuilder() |
FSABuilder(int bufferGrowthSize) |
Modifier and Type | Method and Description |
---|---|
void |
add(byte[] sequence,
int start,
int len)
Add a single sequence of bytes to the FSA.
|
static FSA |
build(byte[][] input)
Build a minimal, deterministic automaton from a sorted list of byte sequences.
|
static FSA |
build(Iterable<byte[]> input)
Build a minimal, deterministic automaton from an iterable list of byte sequences.
|
static int |
compare(byte[] s1,
int start1,
int lens1,
byte[] s2,
int start2,
int lens2)
Lexicographic order of input sequences.
|
FSA |
complete()
Complete the automaton.
|
Map<FSABuilder.InfoEntry,Object> |
getInfo()
Return various statistics concerning the FSA and its compilation.
|
public static final Comparator<byte[]> LEXICAL_ORDERING
compare(byte[], int, int, byte[], int, int)
.public FSABuilder()
public FSABuilder(int bufferGrowthSize)
public void add(byte[] sequence, int start, int len)
public FSA complete()
public static FSA build(byte[][] input)
public static FSA build(Iterable<byte[]> input)
public Map<FSABuilder.InfoEntry,Object> getInfo()
public static int compare(byte[] s1, int start1, int lens1, byte[] s2, int start2, int lens2)
Copyright © 2016. All rights reserved.