static int computeRetainedItems ( final int k , final long n ) { final int bbCnt = computeBaseBufferItems ( k , n ) ; final long bitPattern = computeBitPattern ( k , n ) ; final int validLevels = computeValidLevels ( bitPattern ) ; return bbCnt + ( validLevels * k ) ; }
Returns the number of retained valid items in the sketch given k and n .