Class CachingGraphIndex.View
java.lang.Object
io.github.jbellis.jvector.graph.disk.CachingGraphIndex.View
- All Implemented Interfaces:
GraphIndex.ScoringView
,GraphIndex.View
,Closeable
,AutoCloseable
- Enclosing class:
CachingGraphIndex
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapproximateScoreFunctionFor
(VectorFloat<?> queryVector, VectorSimilarityFunction vsf) void
close()
int
getNeighborsIterator
(int ordinal) Iterator over the neighbors of a given node.Return a Bits instance indicating which nodes are live.rerankerFor
(VectorFloat<?> queryVector, VectorSimilarityFunction vsf) int
size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.jbellis.jvector.graph.GraphIndex.View
getIdUpperBound
-
Field Details
-
view
-
-
Constructor Details
-
View
-
-
Method Details
-
getNeighborsIterator
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 interfaceGraphIndex.View
-
size
public int size()- Specified by:
size
in interfaceGraphIndex.View
- Returns:
- the number of nodes in the graph
-
entryNode
public int entryNode()- Specified by:
entryNode
in interfaceGraphIndex.View
- Returns:
- the node of the graph to start searches at
-
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 interfaceGraphIndex.View
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
rerankerFor
- Specified by:
rerankerFor
in interfaceGraphIndex.ScoringView
-
approximateScoreFunctionFor
public ScoreFunction.ApproximateScoreFunction approximateScoreFunctionFor(VectorFloat<?> queryVector, VectorSimilarityFunction vsf) - Specified by:
approximateScoreFunctionFor
in interfaceGraphIndex.ScoringView
-