Module org.apache.lucene.core
Class Lucene99ScalarQuantizedVectorScorer.DotProduct
java.lang.Object
org.apache.lucene.util.hnsw.RandomVectorScorer.AbstractRandomVectorScorer
org.apache.lucene.codecs.lucene99.Lucene99ScalarQuantizedVectorScorer.DotProduct
- All Implemented Interfaces:
RandomVectorScorer
- Enclosing class:
Lucene99ScalarQuantizedVectorScorer
private static class Lucene99ScalarQuantizedVectorScorer.DotProduct
extends RandomVectorScorer.AbstractRandomVectorScorer
Calculates dot product on quantized vectors, applying the appropriate corrections
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorer
RandomVectorScorer.AbstractRandomVectorScorer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final float
private final float
private final Lucene99ScalarQuantizedVectorScorer.FloatToFloatFunction
private final byte[]
private final QuantizedByteVectorValues
-
Constructor Summary
ConstructorsConstructorDescriptionDotProduct
(QuantizedByteVectorValues values, float constMultiplier, byte[] targetBytes, float offsetCorrection, Lucene99ScalarQuantizedVectorScorer.FloatToFloatFunction scoreAdjustmentFunction) -
Method Summary
Modifier and TypeMethodDescriptionfloat
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 Details
-
constMultiplier
private final float constMultiplier -
values
-
targetBytes
private final byte[] targetBytes -
offsetCorrection
private final float offsetCorrection -
scoreAdjustmentFunction
-
-
Constructor Details
-
DotProduct
public DotProduct(QuantizedByteVectorValues values, float constMultiplier, byte[] targetBytes, float offsetCorrection, Lucene99ScalarQuantizedVectorScorer.FloatToFloatFunction scoreAdjustmentFunction)
-
-
Method Details
-
score
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:
IOException
-