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 java.lang.Object implements RandomAccessVectorValues<T>
-
-
Constructor Summary
Constructors Constructor Description RAVectorValues(java.util.List<T> vectors, int dim)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RandomAccessVectorValues<T>
copy()
Creates a new copy of thisRandomAccessVectorValues
.int
dimension()
Return the dimension of the returned vector valuesint
size()
Return the number of vector valuesT
vectorValue(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, wait
-
Methods inherited from interface org.apache.lucene.util.hnsw.RandomAccessVectorValues
getAcceptOrds, ordToDoc
-
-
-
-
Field Detail
-
vectors
private final java.util.List<T> vectors
-
dim
private final int dim
-
-
Constructor Detail
-
RAVectorValues
RAVectorValues(java.util.List<T> vectors, int dim)
-
-
Method Detail
-
size
public int size()
Description copied from interface:RandomAccessVectorValues
Return the number of vector values- Specified by:
size
in interfaceRandomAccessVectorValues<T>
-
dimension
public int dimension()
Description copied from interface:RandomAccessVectorValues
Return the dimension of the returned vector values- Specified by:
dimension
in interfaceRandomAccessVectorValues<T>
-
vectorValue
public T vectorValue(int targetOrd) throws java.io.IOException
Description copied from interface:RandomAccessVectorValues
Return the vector value indexed at the given ordinal.- Specified by:
vectorValue
in interfaceRandomAccessVectorValues<T>
- Parameters:
targetOrd
- a valid ordinal, ≥ 0 and <RandomAccessVectorValues.size()
.- Throws:
java.io.IOException
-
copy
public RandomAccessVectorValues<T> copy() throws java.io.IOException
Description copied from interface:RandomAccessVectorValues
Creates 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:
copy
in interfaceRandomAccessVectorValues<T>
- Throws:
java.io.IOException
-
-