diff --git a/src/main/java/com/yahoo/sketches/quantiles/HeapQuantilesSketch.java b/src/main/java/com/yahoo/sketches/quantiles/HeapQuantilesSketch.java index 65222a67c..9d70a3a4e 100644 --- a/src/main/java/com/yahoo/sketches/quantiles/HeapQuantilesSketch.java +++ b/src/main/java/com/yahoo/sketches/quantiles/HeapQuantilesSketch.java @@ -111,7 +111,7 @@ private HeapQuantilesSketch(int k, short seed) { * Obtains an instance of a QuantileSketch of double elements. * * @param k Parameter that controls space usage of sketch and accuracy of estimates. - * Must be greater than one and less than 65536. + * Must be greater than 0 and less than 65536. * It is recommended that k be a power of 2 to enable merging of sketches with * different values of k. */ diff --git a/src/main/java/com/yahoo/sketches/quantiles/QuantilesSketchBuilder.java b/src/main/java/com/yahoo/sketches/quantiles/QuantilesSketchBuilder.java index 5d7216adb..f0190d84d 100644 --- a/src/main/java/com/yahoo/sketches/quantiles/QuantilesSketchBuilder.java +++ b/src/main/java/com/yahoo/sketches/quantiles/QuantilesSketchBuilder.java @@ -37,7 +37,7 @@ public QuantilesSketchBuilder() { /** * Sets the parameter k that determines the accuracy and size of the sketch - * @param k determines the accuracy and size of the sketch. k must be greater than 1 and + * @param k determines the accuracy and size of the sketch. k must be greater than 0 and * less than 65536. * It is recommended that k be a power of 2 to enable merging of sketches with * different values of k. @@ -115,7 +115,7 @@ public QuantilesSketch build() { * Returns a QuantilesSketch with the current configuration of this Builder and the * given parameter k. * @param k determines the accuracy and size of the sketch. - * Must be greater than 1 and less than 65536. + * Must be greater than 0 and less than 65536. * @return a QuantilesSketch */ public QuantilesSketch build(int k) { diff --git a/src/main/java/com/yahoo/sketches/quantiles/Util.java b/src/main/java/com/yahoo/sketches/quantiles/Util.java index fb63638ab..4bdcb6e6e 100644 --- a/src/main/java/com/yahoo/sketches/quantiles/Util.java +++ b/src/main/java/com/yahoo/sketches/quantiles/Util.java @@ -405,7 +405,6 @@ static double getAdjustedEpsilon(int k) { * @return the resulting epsilon */ //used only by getAdjustedEpsilon() private static double getTheoreticalEpsilon(int k, double ff) { - //TODO return something if k == 1 !! if (k < 2) throw new IllegalArgumentException("K must be greater than one."); // don't need to check in the other direction because an int is very small double kf = k*ff;