Interface Statistic

All Superinterfaces:
Serializable
All Known Subinterfaces:
OrderedStatistic
All Known Implementing Classes:
BaseStatistic, CountStatistic, ExpressionStatistic, HistogramStatistic, MaxStatistic, MeanStatistic, MedianStatistic, MinStatistic, SumStatistic, TPStatistic

public interface Statistic extends Serializable
Interface for a statistic calculator.
Author:
Brandon Arp (brandon dot arp at inscopemetrics dot com)
  • Method Details

    • getName

      String getName()
      Accessor for the name of the statistic.
      Returns:
      The name of the statistic.
    • getAliases

      Set<String> getAliases()
      Accessor for any aliases of the statistic.
      Returns:
      The aliases of the statistic.
    • createCalculator

      Calculator<?> createCalculator()
      Create a Calculator for this statistic.
      Returns:
      The new Calculator instance.
    • getDependencies

      Set<Statistic> getDependencies()
      Accessor for any dependencies.
      Returns:
      The Set of Statistic dependencies.
    • calculate

      Quantity calculate(List<Quantity> values)
      Compute the statistic from the List of Quantity instances. By default the List of samples is not assumed to be in any particular order. However, any Statistic subclass may implement the marker interface OrderedStatistic 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:
      values - List of samples Quantity instances.
      Returns:
      Computed statistic Quantity instance.
    • calculateAggregations

      Quantity calculateAggregations(List<AggregatedData> aggregations)
      Compute the statistic from the List of AggregatedData instances. By default the List of samples is not assumed to be in any particular order. However, any Statistic subclass may implement the marker interface OrderedStatistic 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.