Package org.apache.lucene.util.automaton
Class LevenshteinAutomata.ParametricDescription
- java.lang.Object
-
- org.apache.lucene.util.automaton.LevenshteinAutomata.ParametricDescription
-
- Direct Known Subclasses:
Lev1ParametricDescription,Lev1TParametricDescription,Lev2ParametricDescription,Lev2TParametricDescription
- Enclosing class:
- LevenshteinAutomata
abstract static class LevenshteinAutomata.ParametricDescription extends java.lang.ObjectA ParametricDescription describes the structure of a Levenshtein DFA for some degree n.There are four components of a parametric description, all parameterized on the length of the word
w:- The number of states:
size() - The set of final states:
isAccept(int) - The transition function:
transition(int, int, int) - Minimal boundary function:
getPosition(int)
-
-
Constructor Summary
Constructors Constructor Description ParametricDescription(int w, int n, int[] minErrors)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) intgetPosition(int absState)Returns the position in the input word for a givenstate.(package private) booleanisAccept(int absState)Returns true if thestatein any Levenshtein DFA is an accept state (final state).(package private) intsize()Return the number of states needed to compute a Levenshtein DFA(package private) abstract inttransition(int state, int position, int vector)Returns the state number for a transition from the givenstate, assumingpositionand characteristic vectorvectorprotected intunpack(long[] data, int index, int bitsPerValue)
-
-
-
Method Detail
-
size
int size()
Return the number of states needed to compute a Levenshtein DFA
-
isAccept
boolean isAccept(int absState)
Returns true if thestatein any Levenshtein DFA is an accept state (final state).
-
getPosition
int getPosition(int absState)
Returns the position in the input word for a givenstate. This is the minimal boundary for the state.
-
transition
abstract int transition(int state, int position, int vector)Returns the state number for a transition from the givenstate, assumingpositionand characteristic vectorvector
-
unpack
protected int unpack(long[] data, int index, int bitsPerValue)
-
-