Module org.apache.lucene.core
Class Lucene99HnswVectorsWriter.RAVectorValues<T>
java.lang.Object
org.apache.lucene.codecs.lucene99.Lucene99HnswVectorsWriter.RAVectorValues<T>
- All Implemented Interfaces:
RandomAccessVectorValues<T>
- Enclosing class:
Lucene99HnswVectorsWriter
private static class Lucene99HnswVectorsWriter.RAVectorValues<T>
extends Object
implements RandomAccessVectorValues<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a new copy of thisRandomAccessVectorValues.intReturn the dimension of the returned vector valuesintsize()Return the number of vector valuesvectorValue(int targetOrd) Return the vector value indexed at the given ordinal.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.hnsw.RandomAccessVectorValues
getAcceptOrds, ordToDoc
-
Field Details
-
vectors
-
dim
private final int dim
-
-
Constructor Details
-
RAVectorValues
-
-
Method Details
-
size
public int size()Description copied from interface:RandomAccessVectorValuesReturn the number of vector values- Specified by:
sizein interfaceRandomAccessVectorValues<T>
-
dimension
public int dimension()Description copied from interface:RandomAccessVectorValuesReturn the dimension of the returned vector values- Specified by:
dimensionin interfaceRandomAccessVectorValues<T>
-
vectorValue
Description copied from interface:RandomAccessVectorValuesReturn the vector value indexed at the given ordinal.- Specified by:
vectorValuein interfaceRandomAccessVectorValues<T>- Parameters:
targetOrd- a valid ordinal, ≥ 0 and <RandomAccessVectorValues.size().- Throws:
IOException
-
copy
Description copied from interface:RandomAccessVectorValuesCreates a new copy of thisRandomAccessVectorValues. This is helpful when you need to access different values at once, to avoid overwriting the underlying float vector returned byRandomAccessVectorValues.vectorValue(int).- Specified by:
copyin interfaceRandomAccessVectorValues<T>- Throws:
IOException
-