Package io.github.jbellis.jvector.graph
Interface GraphIndex.View<T>
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
OnDiskGraphIndex.OnDiskView
- Enclosing interface:
GraphIndex<T>
-
Method Summary
Modifier and TypeMethodDescriptionintdefault intgetNeighborsIterator(int node) Iterator over the neighbors of a given node.getVector(int node) Retrieve the vector associated with a given node.Return a Bits instance indicating which nodes are live.intsize()Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
getNeighborsIterator
Iterator over the neighbors of a given node. Only the most recently instantiated iterator is guaranteed to be valid. -
size
int size()- Returns:
- the number of nodes in the graph
-
entryNode
int entryNode()- Returns:
- the node of the graph to start searches at
-
getVector
Retrieve the vector associated with a given node.This will only be called when a search is performed using approximate similarities. In that situation, we will want to reorder the results by the exact similarity at the end of the search.
-
liveNodes
Bits liveNodes()Return a Bits instance indicating which nodes are live. The result is undefined for ordinals that do not correspond to nodes in the graph. -
getIdUpperBound
default int getIdUpperBound()- Returns:
- the largest ordinal id in the graph. May be different from size() if nodes have been deleted.
-