There seems to be some kind of a bug with HLL execution; when one instantiates an HLL as having a regwidth of 6, the cardinality returned is consistently 0 at large sample sizes. The following test was constructed and run in FullHLLTest. Could this be something to do with cutoff measurements? Thanks!
/**
* Test case for 6-bit cutoff problems
*/
@Test
public void sixBitSixteenKRegisterCutoffBugTest() {
Long temp = System.currentTimeMillis();
// this does NOT work
final HLL brokenHll4 = new HLL(13, 6);
{
Random rand = new Random(temp);
for(int i=0; i<16384*16384; i++) {
long random = rand.nextLong();
brokenHll4.addRaw(random);
}
final long cardinality = brokenHll4.cardinality();
assertTrue(cardinality > 0); // this does NOT work
}
// this DOES work
final HLL brokenHll5 = new HLL(13, 5);
{
Random rand = new Random(temp);
for(int i=0; i<16384*16384; i++) {
long random = rand.nextLong();
brokenHll5.addRaw(random);
}
final long cardinality = brokenHll5.cardinality();
assertTrue(cardinality > 0); // this DOES work
}
}
There seems to be some kind of a bug with HLL execution; when one instantiates an HLL as having a regwidth of 6, the cardinality returned is consistently 0 at large sample sizes. The following test was constructed and run in FullHLLTest. Could this be something to do with cutoff measurements? Thanks!