Package org.openjdk.jmh.util
Interface Statistics
-
- All Superinterfaces:
Comparable<Statistics>,Serializable,org.apache.commons.math3.stat.descriptive.StatisticalSummary
- All Known Implementing Classes:
AbstractStatistics,ListStatistics,MultisetStatistics,SingletonStatistics
public interface Statistics extends Serializable, org.apache.commons.math3.stat.descriptive.StatisticalSummary, Comparable<Statistics>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcompareTo(Statistics other)Compares this statistics to another one.intcompareTo(Statistics other, double confidence)Compares this statistics to another one.double[]getConfidenceIntervalAt(double confidence)Gets the confidence interval at given confidence level.int[]getHistogram(double[] levels)Returns the histogram for this statistics.doublegetMax()Returns the maximum for this statistics.doublegetMean()Returns the arithmetic mean for this statistics.doublegetMeanErrorAt(double confidence)Gets the mean error at given confidence level.doublegetMin()Returns the minimum for this statistics.longgetN()Returns the number of samples in this statistics.doublegetPercentile(double rank)Returns the percentile at given rank.Iterator<Map.Entry<Double,Long>>getRawData()Returns the raw data for this statistics.doublegetStandardDeviation()Returns the standard deviation for this statistics.doublegetSum()Returns the sum of samples in this statistics.doublegetVariance()Returns the variance for this statistics.booleanisDifferent(Statistics other, double confidence)Checks if this statistics statistically different from the given one with the given confidence level.
-
-
-
Method Detail
-
getConfidenceIntervalAt
double[] getConfidenceIntervalAt(double confidence)
Gets the confidence interval at given confidence level.- Parameters:
confidence- confidence level (e.g. 0.95)- Returns:
- the interval in which mean lies with the given confidence level
-
getMeanErrorAt
double getMeanErrorAt(double confidence)
Gets the mean error at given confidence level.- Parameters:
confidence- confidence level (e.g. 0.95)- Returns:
- the mean error with the given confidence level
-
isDifferent
boolean isDifferent(Statistics other, double confidence)
Checks if this statistics statistically different from the given one with the given confidence level.- Parameters:
other- statistics to test againstconfidence- confidence level (e.g. 0.95)- Returns:
- true, if mean difference is statistically significant
-
compareTo
int compareTo(Statistics other)
Compares this statistics to another one. Follows the contract ofComparable.- Specified by:
compareToin interfaceComparable<Statistics>- Parameters:
other- statistics to compare against- Returns:
- a negative integer, zero, or a positive integer as this statistics is less than, equal to, or greater than the specified statistics.
-
compareTo
int compareTo(Statistics other, double confidence)
Compares this statistics to another one. Follows the contract ofComparable.- Parameters:
other- statistics to compare againstconfidence- confidence level (e.g. 0.99)- Returns:
- a negative integer, zero, or a positive integer as this statistics is less than, equal to, or greater than the specified statistics.
-
getMax
double getMax()
Returns the maximum for this statistics.- Specified by:
getMaxin interfaceorg.apache.commons.math3.stat.descriptive.StatisticalSummary- Returns:
- maximum
-
getMin
double getMin()
Returns the minimum for this statistics.- Specified by:
getMinin interfaceorg.apache.commons.math3.stat.descriptive.StatisticalSummary- Returns:
- minimum
-
getMean
double getMean()
Returns the arithmetic mean for this statistics.- Specified by:
getMeanin interfaceorg.apache.commons.math3.stat.descriptive.StatisticalSummary- Returns:
- arithmetic mean
-
getN
long getN()
Returns the number of samples in this statistics.- Specified by:
getNin interfaceorg.apache.commons.math3.stat.descriptive.StatisticalSummary- Returns:
- number of samples
-
getSum
double getSum()
Returns the sum of samples in this statistics.- Specified by:
getSumin interfaceorg.apache.commons.math3.stat.descriptive.StatisticalSummary- Returns:
- sum
-
getStandardDeviation
double getStandardDeviation()
Returns the standard deviation for this statistics.- Specified by:
getStandardDeviationin interfaceorg.apache.commons.math3.stat.descriptive.StatisticalSummary- Returns:
- standard deviation
-
getVariance
double getVariance()
Returns the variance for this statistics.- Specified by:
getVariancein interfaceorg.apache.commons.math3.stat.descriptive.StatisticalSummary- Returns:
- variance
-
getPercentile
double getPercentile(double rank)
Returns the percentile at given rank.- Parameters:
rank- the rank, [0..100]- Returns:
- percentile
-
getHistogram
int[] getHistogram(double[] levels)
Returns the histogram for this statistics. The histogram bin count would be equal to number of levels, minus one; so that each i-th bin is the number of samples in [i-th, (i+1)-th) levels.- Parameters:
levels- levels- Returns:
- histogram data
-
getRawData
Iterator<Map.Entry<Double,Long>> getRawData()
Returns the raw data for this statistics. This data can be useful for custom postprocessing and statistics computations. Note, that values of multiple calls may not be unique. Ordering of the values is not specified.- Returns:
- iterator to raw data. Each item is pair of actual value and number of occurrences of this value.
-
-