public long getMean ( ) { int n = bins . length ; if ( hits . get ( n ) > 0 ) { return Long . MAX_VALUE ; } long cnt = 0 ; long sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { cnt += hits . get ( i ) ; sum += hits . get ( i ) * bins [ i ] ; } return ( long ) Math . ceil ( ( double ) sum / cnt ) ; }
The mean histogram value . If the histogram overflowed returns Long . MAX_VALUE .