Interface Statistic
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
OrderedStatistic
- All Known Implementing Classes:
BaseStatistic
,CountStatistic
,ExpressionStatistic
,HistogramStatistic
,MaxStatistic
,MeanStatistic
,MedianStatistic
,MinStatistic
,SumStatistic
,TPStatistic
Interface for a statistic calculator.
- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot com)
-
Method Summary
Modifier and TypeMethodDescriptioncalculateAggregations
(List<AggregatedData> aggregations) Compute the statistic from theList
ofAggregatedData
instances.Calculator<?>
Create aCalculator
for this statistic.Accessor for any aliases of the statistic.Accessor for any dependencies.getName()
Accessor for the name of the statistic.
-
Method Details
-
getName
String getName()Accessor for the name of the statistic.- Returns:
- The name of the statistic.
-
getAliases
Accessor for any aliases of the statistic.- Returns:
- The aliases of the statistic.
-
createCalculator
Calculator<?> createCalculator()Create aCalculator
for this statistic.- Returns:
- The new
Calculator
instance.
-
getDependencies
Accessor for any dependencies. -
calculate
Compute the statistic from theList
ofQuantity
instances. By default theList
of samples is not assumed to be in any particular order. However, anyStatistic
subclass may implement the marker interfaceOrderedStatistic
indicating a requirement to be provided with samples that are sorted from smallest to largest. In all cases the samples are required to be unified into the same unit (or no unit). -
calculateAggregations
Compute the statistic from theList
ofAggregatedData
instances. By default theList
of samples is not assumed to be in any particular order. However, anyStatistic
subclass may implement the marker interfaceOrderedStatistic
indicating a requirement to be provided with samples that are sorted from smallest to largest. In all cases the samples are required to be unified into the same unit (or no unit).- Parameters:
aggregations
- Aggregations to combine.- Returns:
- Computed statistic value.
-