Package org.apache.lucene.index
Class KnnGraphValues
- java.lang.Object
-
- org.apache.lucene.index.KnnGraphValues
-
-
Field Summary
Fields Modifier and Type Field Description static KnnGraphValuesEMPTYEmpty graph value
-
Constructor Summary
Constructors Modifier Constructor Description protectedKnnGraphValues()Sole constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract intnextNeighbor()Iterates over the neighbor list.abstract voidseek(int target)Move the pointer to exactlytarget, the id of a node in the graph.abstract intsize()Returns the number of nodes in the graph
-
-
-
Field Detail
-
EMPTY
public static KnnGraphValues EMPTY
Empty graph value
-
-
Method Detail
-
seek
public abstract void seek(int target) throws IOExceptionMove the pointer to exactlytarget, the id of a node in the graph. After this method returns, callnextNeighbor()to return successive (ordered) connected node ordinals.- Parameters:
target- must be a valid node in the graph, ie. ≥ 0 and <VectorValues.size().- Throws:
IOException
-
size
public abstract int size()
Returns the number of nodes in the graph
-
nextNeighbor
public abstract int nextNeighbor() throws IOExceptionIterates over the neighbor list. It is illegal to call this method after it returns NO_MORE_DOCS without callingseek(int), which resets the iterator.- Returns:
- a node ordinal in the graph, or NO_MORE_DOCS if the iteration is complete.
- Throws:
IOException
-
-