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 Details

  • Method Details

    • getVector

      public T getVector(int node)
      Description copied from interface: GraphIndex.View
      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.

      Specified by:
      getVector in interface GraphIndex.View<T>
    • getNeighborsIterator

      public NodesIterator getNeighborsIterator(int node)
      Description copied from interface: GraphIndex.View
      Iterator over the neighbors of a given node. Only the most recently instantiated iterator is guaranteed to be valid.
      Specified by:
      getNeighborsIterator in interface GraphIndex.View<T>
    • size

      public int size()
      Specified by:
      size in interface GraphIndex.View<T>
      Returns:
      the number of nodes in the graph
    • entryNode

      public int entryNode()
      Specified by:
      entryNode in interface GraphIndex.View<T>
      Returns:
      the node of the graph to start searches at
    • liveNodes

      public Bits liveNodes()
      Description copied from interface: GraphIndex.View
      Return 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:
      liveNodes in interface GraphIndex.View<T>
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException