private static void probabilisticUnionTest(final ISchemaVersion schemaVersion) throws IOException {
  final Writer output=openOutput(schemaVersion,"probabilistic_probabilistic",TestType.UNION);
  final Random random=new Random(randomLong());
  final HLL hll=newHLL(HLLType.EMPTY);
  final HLL emptyHLL=newHLL(HLLType.EMPTY);
  cumulativeUnionLine(output,hll,emptyHLL,schemaVersion);
  for (int i=0; i < 1000; i++) {
    final HLL fullHLL=newHLL(HLLType.FULL);
    final int elementCount=random.nextInt(10000);
    for (int j=0; j < elementCount; j++) {
      fullHLL.addRaw(random.nextLong());
    }
    cumulativeUnionLine(output,hll,fullHLL,schemaVersion);
  }
  output.flush();
  output.close();
}

private static void probabilisticUnionTest ( final ISchemaVersion schemaVersion ) throws IOException { final Writer output = openOutput ( schemaVersion , "probabilistic_probabilistic" , TestType . UNION ) ; final Random random = new Random ( randomLong ( ) ) ; final HLL hll = newHLL ( HLLType . EMPTY ) ; final HLL emptyHLL = newHLL ( HLLType . EMPTY ) ; cumulativeUnionLine ( output , hll , emptyHLL , schemaVersion ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { final HLL fullHLL = newHLL ( HLLType . FULL ) ; final int elementCount = random . nextInt ( 10000 ) ; for ( int j = 0 ; j < elementCount ; j ++ ) { fullHLL . addRaw ( random . nextLong ( ) ) ; } cumulativeUnionLine ( output , hll , fullHLL , schemaVersion ) ; } output . flush ( ) ; output . close ( ) ; }
unions an empty accumulator with full hlls , each having many registers set , twice in a row to verify that the set properties are satisfied . format : cumulative union tests : - empty u full - full u full
