You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by le...@apache.org on 2020/11/30 05:16:50 UTC

[incubator-datasketches-characterization] 03/03: Fix finals and line lengths

This is an automated email from the ASF dual-hosted git repository.

leerho pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-characterization.git

commit 6665c0d137dd4996a54421d82fbdd6528b0cea8b
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Sun Nov 29 21:16:31 2020 -0800

    Fix finals and line lengths
---
 .../tuple/AodSketchUpdateSpeedProfile.java                 |  2 +-
 .../characterization/tuple/AodUnionUpdateSpeedProfile.java | 14 +++++++++-----
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/datasketches/characterization/tuple/AodSketchUpdateSpeedProfile.java b/src/main/java/org/apache/datasketches/characterization/tuple/AodSketchUpdateSpeedProfile.java
index ee3c081..323092c 100644
--- a/src/main/java/org/apache/datasketches/characterization/tuple/AodSketchUpdateSpeedProfile.java
+++ b/src/main/java/org/apache/datasketches/characterization/tuple/AodSketchUpdateSpeedProfile.java
@@ -63,7 +63,7 @@ public class AodSketchUpdateSpeedProfile extends BaseUpdateSpeedProfile {
   @Override
   public double doTrial(final int uPerTrial) {
     sketch.reset(); // reuse the same sketch
-    double[] values = new double[sketch.getNumValues()];
+    final double[] values = new double[sketch.getNumValues()];
     final long startUpdateTime_nS = System.nanoTime();
 
     for (int u = uPerTrial; u-- > 0;) {
diff --git a/src/main/java/org/apache/datasketches/characterization/tuple/AodUnionUpdateSpeedProfile.java b/src/main/java/org/apache/datasketches/characterization/tuple/AodUnionUpdateSpeedProfile.java
index 41d62ec..e32f2e3 100644
--- a/src/main/java/org/apache/datasketches/characterization/tuple/AodUnionUpdateSpeedProfile.java
+++ b/src/main/java/org/apache/datasketches/characterization/tuple/AodUnionUpdateSpeedProfile.java
@@ -42,10 +42,14 @@ public class AodUnionUpdateSpeedProfile extends BaseUpdateSpeedProfile {
     lgK = Integer.parseInt(prop.mustGet("LgK"));
     numSketches = Integer.parseInt(prop.mustGet("NumSketches"));
     numValues = Integer.parseInt(prop.mustGet("NumValues"));
-    updateSketches = (ArrayOfDoublesUpdatableSketch[]) Array.newInstance(ArrayOfDoublesUpdatableSketch.class, numSketches);
-    compactSketches = (ArrayOfDoublesCompactSketch[]) Array.newInstance(ArrayOfDoublesCompactSketch.class, numSketches);
-    sketchBuilder = new ArrayOfDoublesUpdatableSketchBuilder().setNominalEntries(1 << lgK).setNumberOfValues(numValues);
-    setOpBuilder = new ArrayOfDoublesSetOperationBuilder().setNominalEntries(1 << lgK).setNumberOfValues(numValues);
+    updateSketches = (ArrayOfDoublesUpdatableSketch[])
+        Array.newInstance(ArrayOfDoublesUpdatableSketch.class, numSketches);
+    compactSketches = (ArrayOfDoublesCompactSketch[])
+        Array.newInstance(ArrayOfDoublesCompactSketch.class, numSketches);
+    sketchBuilder = new ArrayOfDoublesUpdatableSketchBuilder().setNominalEntries(1 << lgK)
+        .setNumberOfValues(numValues);
+    setOpBuilder = new ArrayOfDoublesSetOperationBuilder().setNominalEntries(1 << lgK)
+        .setNumberOfValues(numValues);
   }
 
   @Override
@@ -54,7 +58,7 @@ public class AodUnionUpdateSpeedProfile extends BaseUpdateSpeedProfile {
       updateSketches[i] = sketchBuilder.build();
     }
 
-    double[] values = new double[numValues];
+   final double[] values = new double[numValues];
     { // spray keys across all sketches
       int i = 0;
       for (int u = uPerTrial; u-- > 0;) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org