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/06/26 03:53:19 UTC

[incubator-datasketches-cpp] branch tuple_sketch updated: renamed ambiguous comparator

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

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


The following commit(s) were added to refs/heads/tuple_sketch by this push:
     new 821f779  renamed ambiguous comparator
821f779 is described below

commit 821f7795275691608bf11c05e6f355da16d3ad69
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Thu Jun 25 20:53:09 2020 -0700

    renamed ambiguous comparator
---
 tuple/include/theta_intersection_base.hpp  | 2 +-
 tuple/include/theta_union_base.hpp         | 2 +-
 tuple/include/theta_update_sketch_base.hpp | 4 ++--
 tuple/include/tuple_sketch.hpp             | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tuple/include/theta_intersection_base.hpp b/tuple/include/theta_intersection_base.hpp
index 8a34df8..f6c748a 100644
--- a/tuple/include/theta_intersection_base.hpp
+++ b/tuple/include/theta_intersection_base.hpp
@@ -32,7 +32,7 @@ template<
 >
 class theta_intersection_base {
 public:
-  using comparator = comparator<Entry, ExtractKey>;
+  using comparator = compare_by_key<Entry, ExtractKey>;
   theta_intersection_base(uint64_t seed, const Policy& policy);
   ~theta_intersection_base();
   void destroy_objects();
diff --git a/tuple/include/theta_union_base.hpp b/tuple/include/theta_union_base.hpp
index 7b8b256..a41751e 100644
--- a/tuple/include/theta_union_base.hpp
+++ b/tuple/include/theta_union_base.hpp
@@ -36,7 +36,7 @@ class theta_union_base {
 public:
   using resize_factor = theta_constants::resize_factor;
   using hash_table = theta_update_sketch_base<Entry, ExtractKey, Allocator>;
-  using comparator = comparator<Entry, ExtractKey>;
+  using comparator = compare_by_key<Entry, ExtractKey>;
 
   theta_union_base(uint8_t lg_cur_size, uint8_t lg_nom_size, resize_factor rf, float p, uint64_t seed, const Policy& policy);
 
diff --git a/tuple/include/theta_update_sketch_base.hpp b/tuple/include/theta_update_sketch_base.hpp
index 346196e..41c19ce 100644
--- a/tuple/include/theta_update_sketch_base.hpp
+++ b/tuple/include/theta_update_sketch_base.hpp
@@ -34,7 +34,7 @@ namespace theta_constants {
 }
 
 template<typename Entry, typename ExtractKey>
-struct comparator {
+struct compare_by_key {
   bool operator()(Entry& a, Entry& b) const {
     return ExtractKey()(a) < ExtractKey()(b);
   }
@@ -47,7 +47,7 @@ template<
 >
 struct theta_update_sketch_base {
   using resize_factor = theta_constants::resize_factor;
-  using comparator = comparator<Entry, ExtractKey>;
+  using comparator = compare_by_key<Entry, ExtractKey>;
 
   theta_update_sketch_base(uint8_t lg_cur_size, uint8_t lg_nom_size, resize_factor rf, float p, uint64_t seed);
   // TODO: copy and move
diff --git a/tuple/include/tuple_sketch.hpp b/tuple/include/tuple_sketch.hpp
index b37b1fd..5c49533 100644
--- a/tuple/include/tuple_sketch.hpp
+++ b/tuple/include/tuple_sketch.hpp
@@ -402,7 +402,7 @@ public:
   using AllocBytes = typename std::allocator_traits<Allocator>::template rebind_alloc<uint8_t>;
   using vector_bytes = std::vector<uint8_t, AllocBytes>;
   using ExtractKey = pair_extract_key<uint64_t, Summary>;
-  using comparator = comparator<Entry, ExtractKey>;
+  using comparator = compare_by_key<Entry, ExtractKey>;
 
   static const uint8_t SKETCH_TYPE = 3;
 


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