final Random random = new Random(seed);
for(int run=0; run<100; run++) {
final HLL hll = new HLL(log2m, regwidth, 128/*explicitThreshold, arbitrary, unused*/, sparseThreshold, HLLType.SPARSE);
final Int2ByteOpenHashMap map = new Int2ByteOpenHashMap();
map.defaultReturnValue((byte)0);
for(int i=0; i<sparseThreshold; i++) {
final long rawValue = random.nextLong();
final short registerIndex = ProbabilisticTestUtil.getRegisterIndex(rawValue, log2m);
final byte registerValue = ProbabilisticTestUtil.getRegisterValue(rawValue, log2m);
if(map.get(registerIndex) < registerValue) {
map.put(registerIndex, registerValue);
}
hll.addRaw(rawValue);
}
for(int key : map.keySet()) {
final byte expectedRegisterValue = map.get(key);
assertRegisterPresent(hll, key, expectedRegisterValue);
}
}
}