Class Lucene90NeighborArray
java.lang.Object
org.apache.lucene.backward_codecs.lucene90.Lucene90NeighborArray
NeighborArray encodes the neighbors of a node and their mutual scores in the HNSW graph as a pair
of growable arrays.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLucene90NeighborArray
(int maxSize) Create a neighbour array with the given initial size -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int newNode, float newScore) Add a new node with a scorevoid
clear()
Clear all the nodes in the arrayint[]
node()
Direct access to the internal list of node ids; provided for efficient writing of the graphvoid
Remove the last nodes from the arrayfloat[]
score()
Direct access to the internal list of scoresint
size()
Get the size, the number of nodes added so fartoString()
-
Field Details
-
size
private int size -
score
float[] score -
node
int[] node
-
-
Constructor Details
-
Lucene90NeighborArray
public Lucene90NeighborArray(int maxSize) Create a neighbour array with the given initial size
-
-
Method Details
-
add
public void add(int newNode, float newScore) Add a new node with a score -
size
public int size()Get the size, the number of nodes added so far -
node
public int[] node()Direct access to the internal list of node ids; provided for efficient writing of the graph -
score
public float[] score()Direct access to the internal list of scores -
clear
public void clear()Clear all the nodes in the array -
removeLast
public void removeLast()Remove the last nodes from the array -
toString
-