Skip to content

Commit

Permalink
Naming fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ujvl committed Jul 24, 2018
1 parent 00e8022 commit 33e2708
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions libconfluo/confluo/container/sketch/confluo_universal_sketch.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class confluo_substream_summary {
public:
typedef atomic::type<counter_t> atomic_counter_t;
typedef std::vector<atomic::type<size_t>> atomic_vector_t;
typedef count_sketch<counter_t> sketch;
typedef heavy_hitter_set<size_t, counter_t> heavy_hitter_set;
typedef count_sketch<counter_t> sketch_t;
typedef heavy_hitter_set<size_t, counter_t> heavy_hitter_set_t;

confluo_substream_summary() = default;

Expand Down Expand Up @@ -94,15 +94,15 @@ class confluo_substream_summary {
/**
* @return sketch
*/
sketch& get_sketch() {
sketch_t& get_sketch() {
return sketch_;
}

atomic_vector_t& get_heavy_hitters() {
return heavy_hitters_;
}

heavy_hitter_set& get_pq() {
heavy_hitter_set_t& get_pq() {
return hhs_precise_;
}

Expand Down Expand Up @@ -173,9 +173,9 @@ class confluo_substream_summary {
size_t num_hh_; // number of heavy hitters to track (k)

atomic_counter_t l2_squared_; // L2 norm squared
sketch sketch_;
sketch_t sketch_;
atomic_vector_t heavy_hitters_;
heavy_hitter_set hhs_precise_;
heavy_hitter_set_t hhs_precise_;
pairwise_indep_hash hh_hash_;

bool use_precise_hh_;
Expand Down
4 changes: 3 additions & 1 deletion libconfluo/confluo/container/sketch/hash_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace sketch {
class pairwise_indep_hash {

public:
static constexpr size_t PRIME = 39916801UL;
static const size_t PRIME = 39916801UL;

pairwise_indep_hash()
: pairwise_indep_hash(0, 0) {
Expand Down Expand Up @@ -44,6 +44,8 @@ class pairwise_indep_hash {

};

const size_t pairwise_indep_hash::PRIME;

template<typename T>
class hash_manager {
public:
Expand Down
6 changes: 3 additions & 3 deletions libconfluo/confluo/container/sketch/universal_sketch.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class substream_summary {
public:
typedef atomic::type<counter_t> atomic_counter_t;
typedef std::vector<atomic::type<T>> atomic_vector_t;
typedef count_sketch<T, counter_t> sketch;
typedef count_sketch<T, counter_t> sketch_t;

substream_summary() = default;

Expand Down Expand Up @@ -94,7 +94,7 @@ class substream_summary {
/**
* @return sketch
*/
sketch& get_sketch() {
sketch_t& get_sketch() {
return sketch_;
}

Expand Down Expand Up @@ -173,7 +173,7 @@ class substream_summary {
size_t num_hh_; // number of heavy hitters to track (k)

atomic_counter_t l2_squared_; // L2 norm squared
sketch sketch_;
sketch_t sketch_;
atomic_vector_t heavy_hitters_;
heavy_hitter_set<T, counter_t> hhs_precise_;
pairwise_indep_hash hh_hash_;
Expand Down

0 comments on commit 33e2708

Please sign in to comment.