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


##########
src/main/java/org/apache/datasketches/theta/Sketch.java:
##########
@@ -297,13 +297,27 @@ public double getLowerBound(final int numStdDev) {
    * @param numberOfEntries the actual number of entries stored with the 
CompactSketch.
    * @return the maximum number of storage bytes required for a CompactSketch 
with the given number
    * of entries.
+   * @deprecated as a public method. Use {@link #getCompactSketchMaxBytes(int) 
instead}
    */
+  @Deprecated
   public static int getMaxCompactSketchBytes(final int numberOfEntries) {
     if (numberOfEntries == 0) { return 8; }
     if (numberOfEntries == 1) { return 16; }
     return (numberOfEntries << 3) + 24;
   }
 
+  /**
+   * Returns the maximum number of storage bytes required for a CompactSketch 
given the configured
+   * number of nominal entries (power of 2).
+   * @param nomEntries <a 
href="{@docRoot}/resources/dictionary.html#nomEntries">Nominal Entries</a>
+   * @return the maximum number of storage bytes required for a CompactSketch 
with the given
+   * nomEntries.
+   */
+  public static int getCompactSketchMaxBytes(final int nomEntries) {

Review Comment:
   I see your point. But my point is that the getHashTableThreshold(...) is 
doing multiple things and forcing it to just return the rebuild Thresh is a 
hack.  
   
   But to fix this I will need to separate the two functions 
getHashTableResizeThreshold and getHashTableRebuildThreshold.  The resize 
Thresh should never change but the Resize Thresh depends on the type of sketch. 
 
   
   I will fix this, but you will have to approve it again :)



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