Class OffHeapFloatVectorValues
java.lang.Object
org.apache.lucene.search.DocIdSetIterator
org.apache.lucene.index.FloatVectorValues
org.apache.lucene.backward_codecs.lucene94.OffHeapFloatVectorValues
- All Implemented Interfaces:
RandomAccessVectorValues
,RandomAccessVectorValues.Floats
- Direct Known Subclasses:
OffHeapFloatVectorValues.DenseOffHeapVectorValues
,OffHeapFloatVectorValues.EmptyOffHeapVectorValues
,OffHeapFloatVectorValues.SparseOffHeapVectorValues
abstract class OffHeapFloatVectorValues
extends FloatVectorValues
implements RandomAccessVectorValues.Floats
Read the vector values from the index input. This supports both iterated and random access.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
private static class
private static class
Nested classes/interfaces inherited from interface org.apache.lucene.util.hnsw.RandomAccessVectorValues
RandomAccessVectorValues.Bytes, RandomAccessVectorValues.Floats
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final int
protected final int
protected int
protected final int
protected final IndexInput
protected final float[]
protected final VectorSimilarityFunction
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
-
Constructor Summary
ConstructorsConstructorDescriptionOffHeapFloatVectorValues
(int dimension, int size, IndexInput slice, VectorSimilarityFunction vectorSimilarityFunction, int byteSize) -
Method Summary
Modifier and TypeMethodDescriptionint
Return the dimension of the vectors(package private) static OffHeapFloatVectorValues
load
(Lucene94HnswVectorsReader.FieldEntry fieldEntry, IndexInput vectorData) int
size()
Return the number of vectors for this field.float[]
vectorValue
(int targetOrd) Return the vector value indexed at the given ordinal.Methods inherited from class org.apache.lucene.index.FloatVectorValues
checkField, cost, scorer, vectorValue
Methods inherited from class org.apache.lucene.search.DocIdSetIterator
advance, all, docID, empty, nextDoc, range, slowAdvance
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, getSlice, ordToDoc
Methods inherited from interface org.apache.lucene.util.hnsw.RandomAccessVectorValues.Floats
copy, getVectorByteLength
-
Field Details
-
dimension
protected final int dimension -
size
protected final int size -
slice
-
byteSize
protected final int byteSize -
lastOrd
protected int lastOrd -
value
protected final float[] value -
vectorSimilarityFunction
-
-
Constructor Details
-
OffHeapFloatVectorValues
OffHeapFloatVectorValues(int dimension, int size, IndexInput slice, VectorSimilarityFunction vectorSimilarityFunction, int byteSize)
-
-
Method Details
-
dimension
public int dimension()Description copied from class:FloatVectorValues
Return the dimension of the vectors- Specified by:
dimension
in interfaceRandomAccessVectorValues
- Specified by:
dimension
in classFloatVectorValues
-
size
public int size()Description copied from class:FloatVectorValues
Return the number of vectors for this field.- Specified by:
size
in interfaceRandomAccessVectorValues
- Specified by:
size
in classFloatVectorValues
- Returns:
- the number of vectors returned by this iterator
-
vectorValue
Description copied from interface:RandomAccessVectorValues.Floats
Return the vector value indexed at the given ordinal.- Specified by:
vectorValue
in interfaceRandomAccessVectorValues.Floats
- Parameters:
targetOrd
- a valid ordinal, ≥ 0 and <RandomAccessVectorValues.size()
.- Throws:
IOException
-
load
static OffHeapFloatVectorValues load(Lucene94HnswVectorsReader.FieldEntry fieldEntry, IndexInput vectorData) throws IOException - Throws:
IOException
-