msokolov commented on code in PR #14049:
URL: https://github.com/apache/lucene/pull/14049#discussion_r3562249661
##########
lucene/core/src/java/org/apache/lucene/util/quantization/ScalarQuantizer.java:
##########
@@ -97,12 +97,18 @@ public ScalarQuantizer(float minQuantile, float
maxQuantile, byte bits) {
}
assert maxQuantile >= minQuantile;
assert bits > 0 && bits <= 8;
- this.minQuantile = minQuantile;
- this.maxQuantile = maxQuantile;
this.bits = bits;
final float divisor = (float) ((1 << bits) - 1);
- this.scale = divisor / (maxQuantile - minQuantile);
- this.alpha = (maxQuantile - minQuantile) / divisor;
+ if (minQuantile == maxQuantile) {
Review Comment:
No, although it might be too late to do it on the "tonight" of which you
were writing!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]