public double getMean ( ) { if ( getTotalCount ( ) == 0 ) { return 0.0 ; } recordedValuesIterator . reset ( ) ; double totalValue = 0 ; while ( recordedValuesIterator . hasNext ( ) ) { HistogramIterationValue iterationValue = recordedValuesIterator . next ( ) ; totalValue += medianEquivalentValue ( iterationValue . getValueIteratedTo ( ) ) * iterationValue . getCountAtValueIteratedTo ( ) ; } return ( totalValue * 1.0 ) / getTotalCount ( ) ; }
Get the computed mean value of all recorded values in the histogram