Update SketchesCheckstyle

Improvements to getCompactSketchMaxBytes(...)

Renaming of two special functions one in HeapQuickSelectSketch and the
other in DirectQuickSelectSketchR.
Also changed their access privilege.
diff --git a/src/main/java/org/apache/datasketches/theta/DirectQuickSelectSketch.java b/src/main/java/org/apache/datasketches/theta/DirectQuickSelectSketch.java
index 8397c13..a1ac53c 100644
--- a/src/main/java/org/apache/datasketches/theta/DirectQuickSelectSketch.java
+++ b/src/main/java/org/apache/datasketches/theta/DirectQuickSelectSketch.java
@@ -169,7 +169,7 @@
     //clear hash table area
     dstMem.clear(preambleLongs << 3, 8 << lgArrLongs);
 
-    hashTableThreshold_ = setHashTableThreshold(lgNomLongs, lgArrLongs);
+    hashTableThreshold_ = getOffHeapHashTableThreshold(lgNomLongs, lgArrLongs);
     memReqSvr_ = memReqSvr;
   }
 
@@ -210,7 +210,7 @@
 
     final DirectQuickSelectSketch dqss =
         new DirectQuickSelectSketch(seed, srcMem);
-    dqss.hashTableThreshold_ = setHashTableThreshold(lgNomLongs, lgArrLongs);
+    dqss.hashTableThreshold_ = getOffHeapHashTableThreshold(lgNomLongs, lgArrLongs);
     return dqss;
   }
 
@@ -228,7 +228,7 @@
 
     final DirectQuickSelectSketch dqss =
         new DirectQuickSelectSketch(seed, srcMem);
-    dqss.hashTableThreshold_ = setHashTableThreshold(lgNomLongs, lgArrLongs);
+    dqss.hashTableThreshold_ = getOffHeapHashTableThreshold(lgNomLongs, lgArrLongs);
     return dqss;
   }
 
@@ -310,7 +310,7 @@
         if (actLgRF > 0) { //Expand in current Memory
           //lgArrLongs will change; thetaLong, curCount will not
           resize(wmem_, preambleLongs, lgArrLongs, tgtLgArrLongs);
-          hashTableThreshold_ = setHashTableThreshold(lgNomLongs, tgtLgArrLongs);
+          hashTableThreshold_ = getOffHeapHashTableThreshold(lgNomLongs, tgtLgArrLongs);
           return InsertedCountIncrementedResized;
         } //end of Expand in current memory, exit.
 
@@ -330,7 +330,7 @@
           memReqSvr_.requestClose(wmem_, newDstMem);
 
           wmem_ = newDstMem;
-          hashTableThreshold_ = setHashTableThreshold(lgNomLongs, tgtLgArrLongs);
+          hashTableThreshold_ = getOffHeapHashTableThreshold(lgNomLongs, tgtLgArrLongs);
           return InsertedCountIncrementedResized;
         } //end of Request more memory to resize
       } //end of resize
diff --git a/src/main/java/org/apache/datasketches/theta/DirectQuickSelectSketchR.java b/src/main/java/org/apache/datasketches/theta/DirectQuickSelectSketchR.java
index c593f52..566d1b2 100644
--- a/src/main/java/org/apache/datasketches/theta/DirectQuickSelectSketchR.java
+++ b/src/main/java/org/apache/datasketches/theta/DirectQuickSelectSketchR.java
@@ -86,7 +86,7 @@
 
     final DirectQuickSelectSketchR dqssr =
         new DirectQuickSelectSketchR(seed, (WritableMemory) srcMem);
-    dqssr.hashTableThreshold_ = setHashTableThreshold(lgNomLongs, lgArrLongs);
+    dqssr.hashTableThreshold_ = getOffHeapHashTableThreshold(lgNomLongs, lgArrLongs);
     return dqssr;
   }
 
@@ -104,7 +104,7 @@
 
     final DirectQuickSelectSketchR dqss =
         new DirectQuickSelectSketchR(seed, (WritableMemory) srcMem);
-    dqss.hashTableThreshold_ = setHashTableThreshold(lgNomLongs, lgArrLongs);
+    dqss.hashTableThreshold_ = getOffHeapHashTableThreshold(lgNomLongs, lgArrLongs);
     return dqss;
   }
 
@@ -276,7 +276,7 @@
    * @return the hash table threshold
    */
   @SuppressFBWarnings(value = "DB_DUPLICATE_BRANCHES", justification = "False Positive, see the code comments")
-  static final int setHashTableThreshold(final int lgNomLongs, final int lgArrLongs) {
+  protected static final int getOffHeapHashTableThreshold(final int lgNomLongs, final int lgArrLongs) {
     //SpotBugs may complain (DB_DUPLICATE_BRANCHES) if DQS_RESIZE_THRESHOLD == REBUILD_THRESHOLD,
     //but this allows us to tune these constants for different sketches.
     final double fraction = (lgArrLongs <= lgNomLongs) ? DQS_RESIZE_THRESHOLD : ThetaUtil.REBUILD_THRESHOLD;
diff --git a/src/main/java/org/apache/datasketches/theta/HeapQuickSelectSketch.java b/src/main/java/org/apache/datasketches/theta/HeapQuickSelectSketch.java
index 37b6154..627013f 100644
--- a/src/main/java/org/apache/datasketches/theta/HeapQuickSelectSketch.java
+++ b/src/main/java/org/apache/datasketches/theta/HeapQuickSelectSketch.java
@@ -92,7 +92,7 @@
     }
 
     lgArrLongs_ = ThetaUtil.startingSubMultiple(lgNomLongs + 1, rf.lg(), ThetaUtil.MIN_LG_ARR_LONGS);
-    hashTableThreshold_ = setHashTableThreshold(lgNomLongs, lgArrLongs_);
+    hashTableThreshold_ = getHashTableThreshold(lgNomLongs, lgArrLongs_);
     curCount_ = 0;
     thetaLong_ = (long)(p * LONG_MAX_VALUE_AS_DOUBLE);
     empty_ = true; //other flags: bigEndian = readOnly = compact = ordered = false;
@@ -128,7 +128,7 @@
     final HeapQuickSelectSketch hqss = new HeapQuickSelectSketch(lgNomLongs, seed, p, memRF,
         preambleLongs, family);
     hqss.lgArrLongs_ = lgArrLongs;
-    hqss.hashTableThreshold_ = setHashTableThreshold(lgNomLongs, lgArrLongs);
+    hqss.hashTableThreshold_ = getHashTableThreshold(lgNomLongs, lgArrLongs);
     hqss.curCount_ = extractCurCount(srcMem);
     hqss.thetaLong_ = extractThetaLong(srcMem);
     hqss.empty_ = PreambleUtil.isEmptyFlag(srcMem);
@@ -197,7 +197,7 @@
       cache_ = new long[1 << lgArrLongsSM];
       lgArrLongs_ = lgArrLongsSM;
     }
-    hashTableThreshold_ = setHashTableThreshold(lgNomLongs_, lgArrLongs_);
+    hashTableThreshold_ = getHashTableThreshold(lgNomLongs_, lgArrLongs_);
     empty_ = true;
     curCount_ = 0;
     thetaLong_ =  (long)(getP() * LONG_MAX_VALUE_AS_DOUBLE);
@@ -293,7 +293,7 @@
     curCount_ = newCount;
 
     cache_ = tgtArr;
-    hashTableThreshold_ = setHashTableThreshold(lgNomLongs_, lgArrLongs_);
+    hashTableThreshold_ = getHashTableThreshold(lgNomLongs_, lgArrLongs_);
   }
 
   //array stays the same size. Changes theta and thus count
@@ -318,7 +318,7 @@
    * @param lgArrLongs <a href="{@docRoot}/resources/dictionary.html#lgArrLongs">See lgArrLongs</a>.
    * @return the hash table threshold
    */
-  static final int setHashTableThreshold(final int lgNomLongs, final int lgArrLongs) {
+  private static final int getHashTableThreshold(final int lgNomLongs, final int lgArrLongs) {
     final double fraction = (lgArrLongs <= lgNomLongs) ? ThetaUtil.RESIZE_THRESHOLD : ThetaUtil.REBUILD_THRESHOLD;
     return (int) Math.floor(fraction * (1 << lgArrLongs));
   }
diff --git a/src/main/java/org/apache/datasketches/theta/Sketch.java b/src/main/java/org/apache/datasketches/theta/Sketch.java
index b949169..cc1fd4d 100644
--- a/src/main/java/org/apache/datasketches/theta/Sketch.java
+++ b/src/main/java/org/apache/datasketches/theta/Sketch.java
@@ -308,14 +308,14 @@
 
   /**
    * 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>
+   * log_base2 of the number of nominal entries, which is a power of 2.
+   * @param lgNomEntries <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) {
-    final int nomEnt = ceilingPowerOf2(nomEntries);
-    return ((nomEnt << 4) * 15) / 16 + (Family.QUICKSELECT.getMaxPreLongs() << 3);
+  public static int getCompactSketchMaxBytes(final int lgNomEntries) {
+    return (int)((2 << lgNomEntries) * ThetaUtil.REBUILD_THRESHOLD)
+        + Family.QUICKSELECT.getMaxPreLongs() * Long.BYTES;
   }
 
   /**
diff --git a/tools/SketchesCheckstyle.xml b/tools/SketchesCheckstyle.xml
index 8a45ea5..873a878 100644
--- a/tools/SketchesCheckstyle.xml
+++ b/tools/SketchesCheckstyle.xml
@@ -36,18 +36,17 @@
   <property name="charset" value="UTF-8"/>
   <property name="severity" value="warning"/>
   <property name="fileExtensions" value="java"/>
+  <property name="basedir" value="${basedir}"/>
 
+  <!-- Exclude all module-info.java files 
+       https://checkstyle.org/filefilters/beforeexecutionexclusionfilefilter.html#BeforeExecutionExclusionFileFilter -->
   <module name="BeforeExecutionExclusionFileFilter">
-    <property name="fileNamePattern" value="src[\\/]test[\\/]java[\\/].+$|module\-info\.java.+$"/>
+    <property name="fileNamePattern" value="module\-info\.java$"/>
   </module>
-  
-  <!-- Be able to ignore violations with @SuppressWarnings -->
-  <!-- See https://checkstyle.org/config_filters.html#SuppressWarningsFilter -->
-  <module name="SuppressWarningsFilter"/>
-  
-  <module name="SuppressionFilter">
-    <property name="file" value="${config_loc}/suppressions.xml"/>
-    <property name="optional" value="false"/>
+
+  <!-- Exclude all src/test/... files -->
+  <module name="BeforeExecutionExclusionFileFilter">
+    <property name="fileNamePattern" value=".*[\\/]src[\\/]test[\\/].*$"/>
   </module>
 
   <module name="FileTabCharacter">
@@ -77,7 +76,18 @@
   <!-- ******************************************************** -->
   
   <module name="TreeWalker">
-    
+
+    <!-- Be able to ignore violations with @SuppressWarnings -->
+    <!-- See https://checkstyle.org/filters/suppresswarningsfilter.html -->
+    <module name="SuppressWarningsHolder"/>
+  
+    <!--
+      <module name="SuppressionFilter">
+      <property name="file" value="basedir/tools/suppressions.xml"/>
+      <property name="optional" value="false"/>
+      </module>
+    -->
+
     <!-- Annotations -->
     <module name="AnnotationLocation">
       <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>