Class Percentile


  • public class Percentile
    extends Object
    Implementation of "Simulatenous Estimation of Several Persentiles," by Kimmo E. E. Raatikainen This is very useful for profiling the performance of timing characteristics Created by jcairns on 5/28/14.
    • Constructor Detail

      • Percentile

        public Percentile()
      • Percentile

        public Percentile​(float[] quantiles)
    • Method Detail

      • clear

        public void clear()
        clear existing samples
      • add

        public void add​(float x)
        Add a measurement to estimate
        Parameters:
        x - - the value of the measurement
      • getQuantiles

        public float[] getQuantiles()
        Returns:
        float[] - percentiles requested at initialization
      • isReady

        public boolean isReady()
        Returns:
        boolean - true if sufficient samples have been seen to form an estimate
      • getNSamples

        public int getNSamples()
        Returns:
        int - the number of samples in the estimate
      • getMin

        public float getMin()
        Returns:
        float - the minimum sample seen in the distribution
      • getMax

        public float getMax()
        Returns:
        float - the maximum sample seen in the distribution
      • print

        public static void print​(PrintStream out,
                                 String name,
                                 Percentile p)
        print a nice histogram of percentiles
        Parameters:
        out - - output stream
        name - - data set name
        p - - percentile