Module org.apache.lucene.core
Class Lucene95HnswVectorsWriter.RAVectorValues<T>
java.lang.Object
org.apache.lucene.codecs.lucene95.Lucene95HnswVectorsWriter.RAVectorValues<T>
- All Implemented Interfaces:
RandomAccessVectorValues<T>
- Enclosing class:
- Lucene95HnswVectorsWriter
private static class Lucene95HnswVectorsWriter.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.
-
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
-