question: private static void sparseEdgeTest ( final ISchemaVersion schemaVersion ) throws IOException { final Writer output = openOutput ( schemaVersion , "sparse_edge" , TestType . ADD ) ; final HLL hll = newHLL ( HLLType . SPARSE ) ; initLineAdd ( output , hll , schemaVersion ) ; final long firstValue = constructHLLValue ( LOG2M , 0 , 2 ) ; cumulativeAddLine ( output , hll , firstValue , schemaVersion ) ; final long lastValue = constructHLLValue ( LOG2M , ( 1 << LOG2M ) - 1 , 2 ) ; cumulativeAddLine ( output , hll , lastValue , schemaVersion ) ; for ( int i = 2 ; i < ( SPARSE_THRESHOLD + 2 ) ; i ++ ) { final long middleValue = constructHLLValue ( LOG2M , i , 1 ) ; cumulativeAddLine ( output , hll , middleValue , schemaVersion ) ; } output . flush ( ) ; output . close ( ) ; }
target:  Cumulatively sets the first register (index 0) to value 2, the last register (index m-1) to value 2, and then sets registers with indices in the range 2 to (sparseCutoff + 2) to value 1 to trigger promotion. This tests for register alignment in the promotion from SPARSE to FULL. Format: cumulative add Tests: - SPARSE addition - SPARSE to FULL promotion