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 2019/12/17 18:05:48 UTC
[incubator-datasketches-java] 03/10: Improvements to Hll6Array
This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch NewHllIterator
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-java.git
commit 7423b1314c7ede804f333e03e8f282df564df646
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Mon Nov 25 11:30:16 2019 -0800
Improvements to Hll6Array
---
src/main/java/org/apache/datasketches/hll/Hll6Array.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/datasketches/hll/Hll6Array.java b/src/main/java/org/apache/datasketches/hll/Hll6Array.java
index 271100c..495b54a 100644
--- a/src/main/java/org/apache/datasketches/hll/Hll6Array.java
+++ b/src/main/java/org/apache/datasketches/hll/Hll6Array.java
@@ -67,17 +67,17 @@ class Hll6Array extends HllArray {
@Override
HllSketchImpl couponUpdate(final int coupon) {
- final int configKmask = (1 << getLgConfigK()) - 1;
- final int slotNo = HllUtil.getLow26(coupon) & configKmask;
- final int newVal = HllUtil.getValue(coupon);
+ final int configKmask = (1 << lgConfigK) - 1;
+ final int slotNo = coupon & configKmask;
+ final int newVal = coupon >>> KEY_BITS_26;
assert newVal > 0;
- final int curVal = getSlot(slotNo);
+ final int curVal = get6Bit(mem, 0, slotNo);
if (newVal > curVal) {
- putSlot(slotNo, newVal);
+ put6Bit(mem, 0, slotNo, newVal);
hipAndKxQIncrementalUpdate(this, curVal, newVal);
if (curVal == 0) {
- decNumAtCurMin(); //interpret numAtCurMin as num Zeros
+ numAtCurMin--; //interpret numAtCurMin as num Zeros
assert getNumAtCurMin() >= 0;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org