Module org.apache.lucene.core
Class Lucene99ScalarQuantizedVectorScorer.Int4DotProduct
- java.lang.Object
-
- org.apache.lucene.util.hnsw.RandomVectorScorer.AbstractRandomVectorScorer
-
- org.apache.lucene.codecs.lucene99.Lucene99ScalarQuantizedVectorScorer.Int4DotProduct
-
- All Implemented Interfaces:
RandomVectorScorer
- Enclosing class:
- Lucene99ScalarQuantizedVectorScorer
private static class Lucene99ScalarQuantizedVectorScorer.Int4DotProduct extends RandomVectorScorer.AbstractRandomVectorScorer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorer
RandomVectorScorer.AbstractRandomVectorScorer
-
-
Field Summary
Fields Modifier and Type Field Description private float
constMultiplier
private float
offsetCorrection
private Lucene99ScalarQuantizedVectorScorer.FloatToFloatFunction
scoreAdjustmentFunction
private byte[]
targetBytes
private RandomAccessQuantizedByteVectorValues
values
-
Constructor Summary
Constructors Constructor Description Int4DotProduct(RandomAccessQuantizedByteVectorValues values, float constMultiplier, byte[] targetBytes, float offsetCorrection, Lucene99ScalarQuantizedVectorScorer.FloatToFloatFunction scoreAdjustmentFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
score(int vectorOrdinal)
Returns the score between the query and the provided node.-
Methods inherited from class org.apache.lucene.util.hnsw.RandomVectorScorer.AbstractRandomVectorScorer
getAcceptOrds, maxOrd, ordToDoc
-
-
-
-
Field Detail
-
constMultiplier
private final float constMultiplier
-
values
private final RandomAccessQuantizedByteVectorValues values
-
targetBytes
private final byte[] targetBytes
-
offsetCorrection
private final float offsetCorrection
-
scoreAdjustmentFunction
private final Lucene99ScalarQuantizedVectorScorer.FloatToFloatFunction scoreAdjustmentFunction
-
-
Constructor Detail
-
Int4DotProduct
public Int4DotProduct(RandomAccessQuantizedByteVectorValues values, float constMultiplier, byte[] targetBytes, float offsetCorrection, Lucene99ScalarQuantizedVectorScorer.FloatToFloatFunction scoreAdjustmentFunction)
-
-
Method Detail
-
score
public float score(int vectorOrdinal) throws java.io.IOException
Description copied from interface:RandomVectorScorer
Returns the score between the query and the provided node.- Parameters:
vectorOrdinal
- a random node in the graph- Returns:
- the computed score
- Throws:
java.io.IOException
-
-