Package io.github.jbellis.jvector.disk
Class OnDiskGraphIndex.OnDiskView
java.lang.Object
io.github.jbellis.jvector.disk.OnDiskGraphIndex.OnDiskView
- All Implemented Interfaces:
GraphIndex.View<T>,AutoCloseable
- Enclosing class:
OnDiskGraphIndex<T>
public class OnDiskGraphIndex.OnDiskView
extends Object
implements GraphIndex.View<T>, AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.jbellis.jvector.graph.GraphIndex.View
getIdUpperBound
-
Constructor Details
-
OnDiskView
-
-
Method Details
-
getVector
Description copied from interface:GraphIndex.ViewRetrieve 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.
- Specified by:
getVectorin interfaceGraphIndex.View<T>
-
getNeighborsIterator
Description copied from interface:GraphIndex.ViewIterator over the neighbors of a given node. Only the most recently instantiated iterator is guaranteed to be valid.- Specified by:
getNeighborsIteratorin interfaceGraphIndex.View<T>
-
size
public int size()- Specified by:
sizein interfaceGraphIndex.View<T>- Returns:
- the number of nodes in the graph
-
entryNode
public int entryNode()- Specified by:
entryNodein interfaceGraphIndex.View<T>- Returns:
- the node of the graph to start searches at
-
liveNodes
Description copied from interface:GraphIndex.ViewReturn a Bits instance indicating which nodes are live. The result is undefined for ordinals that do not correspond to nodes in the graph.- Specified by:
liveNodesin interfaceGraphIndex.View<T>
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-