public int log2Chunks ( final int log2chunks ) { this . chunks = 1 << log2chunks ; diskChunkStep = ( int ) Math . max ( DISK_CHUNKS / chunks , 1 ) ; virtualDiskChunks = DISK_CHUNKS / diskChunkStep ; if ( DEBUG ) { System . err . print ( "Chunk sizes: " ) ; final double avg = filteredSize / ( double ) DISK_CHUNKS ; double var = 0 ; for ( int i = 0 ; i < DISK_CHUNKS ; i ++ ) { System . err . print ( i + ":" + count [ i ] + " " ) ; var += ( count [ i ] - avg ) * ( count [ i ] - avg ) ; } System . err . println ( ) ; System . err . println ( "Average: " + avg ) ; System . err . println ( "Variance: " + var / filteredSize ) ; } chunkShift = Long . SIZE - log2chunks ; LOGGER . debug ( "Number of chunks: " + chunks ) ; LOGGER . debug ( "Number of disk chunks: " + DISK_CHUNKS ) ; LOGGER . debug ( "Number of virtual disk chunks: " + virtualDiskChunks ) ; return chunkShift ; }
Sets the number of chunks .