You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by al...@apache.org on 2020/03/27 01:00:44 UTC

[incubator-datasketches-characterization] branch bounds updated: characterize bounds

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

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


The following commit(s) were added to refs/heads/bounds by this push:
     new 2077b12  characterize bounds
2077b12 is described below

commit 2077b1208980b4271bdce361bf47d4915cc4a482
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Thu Mar 26 18:00:36 2020 -0700

    characterize bounds
---
 cpp/src/cpc_sketch_accuracy_profile.cpp   | 6 +++++-
 cpp/src/cpc_union_accuracy_profile.cpp    | 7 ++++++-
 cpp/src/hll_sketch_accuracy_profile.cpp   | 6 +++++-
 cpp/src/hll_union_accuracy_profile.cpp    | 8 ++------
 cpp/src/theta_sketch_accuracy_profile.cpp | 6 +++++-
 cpp/src/theta_union_accuracy_profile.cpp  | 7 ++++++-
 6 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/cpp/src/cpc_sketch_accuracy_profile.cpp b/cpp/src/cpc_sketch_accuracy_profile.cpp
index 19f588a..52231de 100644
--- a/cpp/src/cpc_sketch_accuracy_profile.cpp
+++ b/cpp/src/cpc_sketch_accuracy_profile.cpp
@@ -35,7 +35,11 @@ void cpc_sketch_accuracy_profile::run_trial() {
       s.update(key++);
     }
     count += delta;
-    stat.update(s.get_estimate());
+    stat.update(
+      s.get_estimate(),
+      s.get_lower_bound(1), s.get_lower_bound(2), s.get_lower_bound(3),
+      s.get_upper_bound(1), s.get_upper_bound(2), s.get_upper_bound(3)
+    );
   }
 }
 
diff --git a/cpp/src/cpc_union_accuracy_profile.cpp b/cpp/src/cpc_union_accuracy_profile.cpp
index 02536f7..983e775 100644
--- a/cpp/src/cpc_union_accuracy_profile.cpp
+++ b/cpp/src/cpc_union_accuracy_profile.cpp
@@ -45,7 +45,12 @@ void cpc_union_accuracy_profile::run_trial() {
     for (auto& sketch: sketches) {
       u.update(*sketch);
     }
-    stat.update(u.get_result().get_estimate());
+    cpc_sketch result = u.get_result();
+    stat.update(
+      result.get_estimate(),
+      result.get_lower_bound(1), result.get_lower_bound(2), result.get_lower_bound(3),
+      result.get_upper_bound(1), result.get_upper_bound(2), result.get_upper_bound(3)
+    );
   }
 }
 
diff --git a/cpp/src/hll_sketch_accuracy_profile.cpp b/cpp/src/hll_sketch_accuracy_profile.cpp
index babf55e..ac414e8 100644
--- a/cpp/src/hll_sketch_accuracy_profile.cpp
+++ b/cpp/src/hll_sketch_accuracy_profile.cpp
@@ -35,7 +35,11 @@ void hll_sketch_accuracy_profile::run_trial() {
       s.update(key++);
     }
     count += delta;
-    stat.update(s.get_estimate());
+    stat.update(
+      s.get_estimate(),
+      s.get_lower_bound(1), s.get_lower_bound(2), s.get_lower_bound(3),
+      s.get_upper_bound(1), s.get_upper_bound(2), s.get_upper_bound(3)
+    );
   }
 }
 
diff --git a/cpp/src/hll_union_accuracy_profile.cpp b/cpp/src/hll_union_accuracy_profile.cpp
index c1f8bae..4e92ab4 100644
--- a/cpp/src/hll_union_accuracy_profile.cpp
+++ b/cpp/src/hll_union_accuracy_profile.cpp
@@ -47,12 +47,8 @@ void hll_union_accuracy_profile::run_trial() {
     }
     stat.update(
       u.get_estimate(),
-      u.get_lower_bound(1),
-      u.get_lower_bound(2),
-      u.get_lower_bound(3),
-      u.get_upper_bound(1),
-      u.get_upper_bound(2),
-      u.get_upper_bound(3)
+      u.get_lower_bound(1), u.get_lower_bound(2), u.get_lower_bound(3),
+      u.get_upper_bound(1), u.get_upper_bound(2), u.get_upper_bound(3)
     );
   }
 }
diff --git a/cpp/src/theta_sketch_accuracy_profile.cpp b/cpp/src/theta_sketch_accuracy_profile.cpp
index 2a133cf..ae9a1e3 100644
--- a/cpp/src/theta_sketch_accuracy_profile.cpp
+++ b/cpp/src/theta_sketch_accuracy_profile.cpp
@@ -35,7 +35,11 @@ void theta_sketch_accuracy_profile::run_trial() {
       s.update(key++);
     }
     count += delta;
-    stat.update(s.get_estimate());
+    stat.update(
+      s.get_estimate(),
+      s.get_lower_bound(1), s.get_lower_bound(2), s.get_lower_bound(3),
+      s.get_upper_bound(1), s.get_upper_bound(2), s.get_upper_bound(3)
+    );
   }
 }
 
diff --git a/cpp/src/theta_union_accuracy_profile.cpp b/cpp/src/theta_union_accuracy_profile.cpp
index d49bedb..5964f88 100644
--- a/cpp/src/theta_union_accuracy_profile.cpp
+++ b/cpp/src/theta_union_accuracy_profile.cpp
@@ -47,7 +47,12 @@ void theta_union_accuracy_profile::run_trial() {
     for (auto& sketch: sketches) {
       u.update(*sketch);
     }
-    stat.update(u.get_result().get_estimate());
+    compact_theta_sketch result = u.get_result();
+    stat.update(
+      result.get_estimate(),
+      result.get_lower_bound(1), result.get_lower_bound(2), result.get_lower_bound(3),
+      result.get_upper_bound(1), result.get_upper_bound(2), result.get_upper_bound(3)
+    );
   }
 }
 


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