Class AverageMinMax

  • All Implemented Interfaces:
    Streamable

    public class AverageMinMax
    extends Average
    Measures min and max in addition to average
    Since:
    4.0, 3.6.10
    Author:
    Bela Ban
    • Field Detail

      • min

        protected double min
      • max

        protected double max
      • values

        protected java.util.List<java.lang.Double> values
      • sorted

        protected volatile boolean sorted
    • Constructor Detail

      • AverageMinMax

        public AverageMinMax()
      • AverageMinMax

        public AverageMinMax​(int capacity)
    • Method Detail

      • min

        public double min()
      • max

        public double max()
      • usePercentiles

        public boolean usePercentiles()
      • usePercentiles

        public AverageMinMax usePercentiles​(int cap)
      • values

        public java.util.List<java.lang.Double> values()
      • add

        public <T extends Average> T add​(double num)
        Overrides:
        add in class Average
      • add

        public <T extends Average> T add​(long num)
        Overrides:
        add in class Average
      • merge

        public <T extends Average> T merge​(T other)
        Description copied from class: Average
        Merges this average with another one
        Overrides:
        merge in class Average
      • clear

        public void clear()
        Overrides:
        clear in class Average
      • percentiles

        public java.lang.String percentiles()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Average
      • toString

        public java.lang.String toString​(java.util.concurrent.TimeUnit u)
        Overrides:
        toString in class Average
      • writeTo

        public void writeTo​(java.io.DataOutput out)
                     throws java.io.IOException
        Description copied from interface: Streamable
        Write the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed
        Specified by:
        writeTo in interface Streamable
        Overrides:
        writeTo in class Average
        Throws:
        java.io.IOException
      • readFrom

        public void readFrom​(java.io.DataInput in)
                      throws java.io.IOException
        Description copied from interface: Streamable
        Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed
        Specified by:
        readFrom in interface Streamable
        Overrides:
        readFrom in class Average
        Throws:
        java.io.IOException
      • percentile

        public double percentile​(double percentile)
      • p

        public double p​(double percentile)
      • stddev

        public double stddev()