Package org.apache.lucene.analysis.morph
Class Viterbi.WrappedPositionArray<U extends Viterbi.Position>
java.lang.Object
org.apache.lucene.analysis.morph.Viterbi.WrappedPositionArray<U>
- Enclosing class:
Viterbi<T extends Token,
U extends Viterbi.Position>
Holds partial graph (array of positions) for calculating the minimum cost path
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
freeBefore
(int pos) get
(int pos) Get Position instance for this absolute position; this is allowed to be arbitrarily far "in the future" but cannot be before the last freeBefore.private int
getIndex
(int pos) (package private) int
private boolean
inBounds
(int pos) (package private) void
reset()
-
Field Details
-
positions
-
clazz
-
nextWrite
private int nextWrite -
nextPos
private int nextPos -
count
private int count
-
-
Constructor Details
-
WrappedPositionArray
-
-
Method Details
-
reset
void reset() -
get
Get Position instance for this absolute position; this is allowed to be arbitrarily far "in the future" but cannot be before the last freeBefore. -
getNextPos
int getNextPos() -
inBounds
private boolean inBounds(int pos) -
getIndex
private int getIndex(int pos) -
freeBefore
public void freeBefore(int pos)
-