Package org.apache.lucene.util.hnsw
Class NeighborArray
java.lang.Object
org.apache.lucene.util.hnsw.NeighborArray
NeighborArray encodes the neighbors of a node and their mutual scores in the HNSW graph as a pair
of growable arrays.
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
NeighborArray
public NeighborArray(int maxSize)
-
-
Method Details
-
add
public void add(int newNode, float newScore) -
size
public int size() -
node
public int[] node()Direct access to the internal list of node ids; provided for efficient writing of the graph- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
score
public float[] score() -
clear
public void clear() -
removeLast
public void removeLast() -
toString
-