Package org.openjdk.jmh.util
Class AbstractStatistics
- java.lang.Object
-
- org.openjdk.jmh.util.AbstractStatistics
-
- All Implemented Interfaces:
Serializable
,Comparable<Statistics>
,org.apache.commons.math3.stat.descriptive.StatisticalSummary
,Statistics
- Direct Known Subclasses:
ListStatistics
,MultisetStatistics
,SingletonStatistics
public abstract class AbstractStatistics extends Object implements Statistics
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractStatistics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Statistics other)
Compares this statistics to another one.int
compareTo(Statistics other, double confidence)
Compares this statistics to another one.double[]
getConfidenceIntervalAt(double confidence)
Returns the interval c1, c2 of which there's an 1-alpha probability of the mean being within the interval.double
getMean()
Returns the arithmetic mean for this statistics.double
getMeanErrorAt(double confidence)
Gets the mean error at given confidence level.double
getStandardDeviation()
Returns the standard deviation for this statistics.boolean
isDifferent(Statistics other, double confidence)
Checks if this statistics statistically different from the given one with the given confidence level.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openjdk.jmh.util.Statistics
getHistogram, getMax, getMin, getN, getPercentile, getRawData, getSum, getVariance
-
-
-
-
Method Detail
-
getConfidenceIntervalAt
public double[] getConfidenceIntervalAt(double confidence)
Returns the interval c1, c2 of which there's an 1-alpha probability of the mean being within the interval.- Specified by:
getConfidenceIntervalAt
in interfaceStatistics
- Parameters:
confidence
- level- Returns:
- the confidence interval
-
isDifferent
public boolean isDifferent(Statistics other, double confidence)
Description copied from interface:Statistics
Checks if this statistics statistically different from the given one with the given confidence level.- Specified by:
isDifferent
in interfaceStatistics
- Parameters:
other
- statistics to test againstconfidence
- confidence level (e.g. 0.95)- Returns:
- true, if mean difference is statistically significant
-
getMeanErrorAt
public double getMeanErrorAt(double confidence)
Description copied from interface:Statistics
Gets the mean error at given confidence level.- Specified by:
getMeanErrorAt
in interfaceStatistics
- Parameters:
confidence
- confidence level (e.g. 0.95)- Returns:
- the mean error with the given confidence level
-
getMean
public double getMean()
Description copied from interface:Statistics
Returns the arithmetic mean for this statistics.- Specified by:
getMean
in interfaceorg.apache.commons.math3.stat.descriptive.StatisticalSummary
- Specified by:
getMean
in interfaceStatistics
- Returns:
- arithmetic mean
-
getStandardDeviation
public double getStandardDeviation()
Description copied from interface:Statistics
Returns the standard deviation for this statistics.- Specified by:
getStandardDeviation
in interfaceorg.apache.commons.math3.stat.descriptive.StatisticalSummary
- Specified by:
getStandardDeviation
in interfaceStatistics
- Returns:
- standard deviation
-
compareTo
public int compareTo(Statistics other, double confidence)
Description copied from interface:Statistics
Compares this statistics to another one. Follows the contract ofComparable
.- Specified by:
compareTo
in interfaceStatistics
- 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.
-
compareTo
public int compareTo(Statistics other)
Description copied from interface:Statistics
Compares this statistics to another one. Follows the contract ofComparable
.- Specified by:
compareTo
in interfaceComparable<Statistics>
- Specified by:
compareTo
in interfaceStatistics
- 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.
-
-