Record Class OptimizedScalarQuantizer.QuantizationResult
java.lang.Object
java.lang.Record
org.apache.lucene.util.quantization.OptimizedScalarQuantizer.QuantizationResult
- Record Components:
lowerInterval- the lower interval boundupperInterval- the upper interval boundadditionalCorrection- the additional correctionquantizedComponentSum- the sum of the quantized components
- Enclosing class:
OptimizedScalarQuantizer
public static record OptimizedScalarQuantizer.QuantizationResult(float lowerInterval, float upperInterval, float additionalCorrection, int quantizedComponentSum)
extends Record
Quantization result containing the lower and upper interval bounds, the additional correction
-
Constructor Summary
ConstructorsConstructorDescriptionQuantizationResult(float lowerInterval, float upperInterval, float additionalCorrection, int quantizedComponentSum) Creates an instance of aQuantizationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of theadditionalCorrectionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of thelowerIntervalrecord component.intReturns the value of thequantizedComponentSumrecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of theupperIntervalrecord component.
-
Constructor Details
-
QuantizationResult
public QuantizationResult(float lowerInterval, float upperInterval, float additionalCorrection, int quantizedComponentSum) Creates an instance of aQuantizationResultrecord class.- Parameters:
lowerInterval- the value for thelowerIntervalrecord componentupperInterval- the value for theupperIntervalrecord componentadditionalCorrection- the value for theadditionalCorrectionrecord componentquantizedComponentSum- the value for thequantizedComponentSumrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
lowerInterval
public float lowerInterval()Returns the value of thelowerIntervalrecord component.- Returns:
- the value of the
lowerIntervalrecord component
-
upperInterval
public float upperInterval()Returns the value of theupperIntervalrecord component.- Returns:
- the value of the
upperIntervalrecord component
-
additionalCorrection
public float additionalCorrection()Returns the value of theadditionalCorrectionrecord component.- Returns:
- the value of the
additionalCorrectionrecord component
-
quantizedComponentSum
public int quantizedComponentSum()Returns the value of thequantizedComponentSumrecord component.- Returns:
- the value of the
quantizedComponentSumrecord component
-