private static void fullCardinalityCorrectionTest(final ISchemaVersion schemaVersion) throws IOException {
  final Writer output=openOutput(schemaVersion,"cardinality_correction",TestType.ADD);
  final HLL hll=newHLL(HLLType.FULL);
  initLineAdd(output,hll,schemaVersion);
  for (int i=0; i < ((1 << LOG2M) - 1); i++) {
    final long rawValue=constructHLLValue(LOG2M,i,1);
    cumulativeAddLine(output,hll,rawValue,schemaVersion);
  }
  for (int i=0; i < (1 << LOG2M); i++) {
    final long rawValue=constructHLLValue(LOG2M,i,7);
    cumulativeAddLine(output,hll,rawValue,schemaVersion);
  }
  for (int i=0; i < (1 << LOG2M); i++) {
    final long rawValue=constructHLLValue(LOG2M,i,30);
    cumulativeAddLine(output,hll,rawValue,schemaVersion);
  }
  output.flush();
  output.close();
}

private static void fullCardinalityCorrectionTest ( final ISchemaVersion schemaVersion ) throws IOException { final Writer output = openOutput ( schemaVersion , "cardinality_correction" , TestType . ADD ) ; final HLL hll = newHLL ( HLLType . FULL ) ; initLineAdd ( output , hll , schemaVersion ) ; for ( int i = 0 ; i < ( ( 1 << LOG2M ) - 1 ) ; i ++ ) { final long rawValue = constructHLLValue ( LOG2M , i , 1 ) ; cumulativeAddLine ( output , hll , rawValue , schemaVersion ) ; } for ( int i = 0 ; i < ( 1 << LOG2M ) ; i ++ ) { final long rawValue = constructHLLValue ( LOG2M , i , 7 ) ; cumulativeAddLine ( output , hll , rawValue , schemaVersion ) ; } for ( int i = 0 ; i < ( 1 << LOG2M ) ; i ++ ) { final long rawValue = constructHLLValue ( LOG2M , i , 30 ) ; cumulativeAddLine ( output , hll , rawValue , schemaVersion ) ; } output . flush ( ) ; output . close ( ) ; }
cumulatively adds random values to a full hll through the small range correction , uncorrected range , and large range correction of the hll ' s cardinality estimator . format : cumulative add tests : - full cardinality computation
