leerho commented on code in PR #475:
URL: https://github.com/apache/datasketches-java/pull/475#discussion_r1410012504


##########
src/main/java/org/apache/datasketches/kll/KllItemsSketchSortedView.java:
##########
@@ -132,18 +204,36 @@ public double[] getPMF(final T[] splitPoints, final 
QuantileSearchCriteria searc
   public T getQuantile(final double rank, final QuantileSearchCriteria 
searchCrit) {
     if (isEmpty()) { throw new SketchesArgumentException(EMPTY_MSG); }
     QuantilesUtil.checkNormalizedRankBounds(rank);
+    final int index = getQuantileIndex(rank, searchCrit);
+    return getQuantileFromIndex(index);
+  }
+
+  private T getQuantileFromIndex(final int index) { return quantiles[index]; }

Review Comment:
   I did misunderstand you. It is now fixed.  
   When I created it I thought these methods would be used externally, then 
later I made them private when I realized they wouldn't be needed externally.  
I forgot to do the simplification you are suggesting.  Thanks!



-- 
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]

Reply via email to