org.apache.jorphan.math
Class StatCalculator
public class StatCalculator
This class serves as a way to calculate the median of a list of values. It is
not threadsafe.
addBytes
public void addBytes(long newValue)
addValue
public void addValue(Number val)
addValue
public void addValue(double newValue)
addValue
public void addValue(float newValue)
addValue
public void addValue(int newValue)
addValue
public void addValue(long newValue)
getCount
public int getCount()
getDistribution
public HashMap getDistribution()
The method has a limit of 1% as the finest granularity. We do this to
make sure we get a whole number for iterating.
getMax
public Number getMax()
getMean
public double getMean()
getMedian
public Number getMedian()
getMin
public Number getMin()
getPercentPoint
public Number getPercentPoint(double percent)
Get the value which %percent% of the values are less than. This works
just like median (where median represents the 50% point). A typical
desire is to see the 90% point - the value that 90% of the data points
are below, the remaining 10% are above.
- number of values less than the percentage
getPercentPoint
public Number getPercentPoint(float percent)
Get the value which %percent% of the values are less than. This works
just like median (where median represents the 50% point). A typical
desire is to see the 90% point - the value that 90% of the data points
are below, the remaining 10% are above.
- number of values less than the percentage
getStandardDeviation
public double getStandardDeviation()
getTotalBytes
public long getTotalBytes()
Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.