Skip to content

Commit

Permalink
Fixed bug in merge()
Browse files Browse the repository at this point in the history
  • Loading branch information
hideo55 committed Jul 24, 2015
1 parent 2160c9e commit b8cb5e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/hyperloglog.hpp
Expand Up @@ -147,7 +147,7 @@ class HyperLogLog {
}
for (uint32_t r = 0; r < m_; ++r) {
if (M_[r] < other.M_[r]) {
M_[r] = other.M_[r];
M_[r] |= other.M_[r];
}
}
}
Expand Down Expand Up @@ -289,7 +289,7 @@ class HyperLogLogHIP : public HyperLogLog {
if (b < b_other) {
c_ += 1.0 / (p_/m_);
p_ -= 1.0/(1 << b);
M_[r] = b_other;
M_[r] |= b_other;
if(b_other < register_limit_){
p_ += 1.0/(1 << b_other);
}
Expand Down

0 comments on commit b8cb5e7

Please sign in to comment.