You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libs/exponential-histogram/src/main/java/org/elasticsearch/exponentialhistogram/ExponentialHistogramQuantile.java
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ public class ExponentialHistogramQuantile {
34
34
* It returns the value of the element at rank {@code max(0, min(n - 1, (quantile * (n + 1)) - 1))}, where n is the total number of
35
35
* values and rank starts at 0. If the rank is fractional, the result is linearly interpolated from the values of the two
36
36
* neighboring ranks.
37
+
* The result is clamped to the histogram's minimum and maximum values.
37
38
*
38
39
* @param histo the histogram representing the distribution
39
40
* @param quantile the quantile to query, in the range [0, 1]
Copy file name to clipboardExpand all lines: libs/exponential-histogram/src/test/java/org/elasticsearch/exponentialhistogram/QuantileAccuracyTests.java
+38Lines changed: 38 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,44 @@ public void testNoNegativeZeroReturned() {
0 commit comments