Enum Class SummaryStat

java.lang.Object
java.lang.Enum<SummaryStat>
net.royalur.stats.SummaryStat
All Implemented Interfaces:
Serializable, Comparable<SummaryStat>, Constable

public enum SummaryStat extends Enum<SummaryStat>
A statistic that can be used to summarise a set of measurements.
  • Enum Constant Details

    • MIN

      public static final SummaryStat MIN
      The minimum of all the measurements.
    • MAX

      public static final SummaryStat MAX
      The maximum of all the measurements.
    • SUM

      public static final SummaryStat SUM
      The sum of all the measurements.
    • MEAN

      public static final SummaryStat MEAN
      The mean of all the measurements.
    • VARIANCE

      public static final SummaryStat VARIANCE
      The variance of all the measurements.
    • STD_DEV

      public static final SummaryStat STD_DEV
      The standard deviation of all the measurements.
    • MEDIAN

      public static final SummaryStat MEDIAN
      The median of all measurements.
    • PERCENTILE_5

      public static final SummaryStat PERCENTILE_5
      The 5th percentile of measurements.
    • PERCENTILE_25

      public static final SummaryStat PERCENTILE_25
      The 25th percentile of measurements.
    • PERCENTILE_75

      public static final SummaryStat PERCENTILE_75
      The 75th percentile of measurements.
    • PERCENTILE_95

      public static final SummaryStat PERCENTILE_95
      The 95th percentile of measurements.
  • Method Details

    • values

      public static SummaryStat[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SummaryStat valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • compute

      public static double[] compute(double[] measurements)
      Computes all summary statistics for the measurements in measurements. The indices into the returned array represent the ordinal of the SummaryStat enum entries.
      Parameters:
      measurements - The measurements to summarise.
      Returns:
      The summary statistics for the measurements in measurements.