public void extractLowBitsTo(HLLRegister dest) { for (int idx = 0; idx < register.length; idx++) { byte lr = register[idx]; // this can be a max of 65, never > 127 if (lr != 0) { dest.add((long) ((1 << (p + lr - 1)) | idx)); } } }
public void extractLowBitsTo(HLLRegister dest) { for (Entry<Integer, Byte> entry : getSparseMap().entrySet()) { int idx = entry.getKey(); byte lr = entry.getValue(); // this can be a max of 65, never > 127 if (lr != 0) { // should be a no-op for sparse dest.add((long) ((1 << (p + lr - 1)) | idx)); } } }
public void extractLowBitsTo(HLLRegister dest) { for (int idx = 0; idx < register.length; idx++) { byte lr = register[idx]; // this can be a max of 65, never > 127 if (lr != 0) { dest.add((long) ((1 << (p + lr - 1)) | idx)); } } }