Class Histogram


  • public class Histogram
    extends Object
    A helper class for plotting the evaluation results in histogram form.
    Author:
    xiao
    • Constructor Detail

      • Histogram

        public Histogram​(int[] limits)
    • Method Detail

      • printResult

        public void printResult​(PrintStream output)
      • printResult

        public void printResult​(PrintStream output,
                                String title,
                                Histogram other)
        This function prints two histograms together for comparative reading. It requires the two histograms having the same data separators.
        Parameters:
        output -
        title -
        other -
      • addNumber

        public void addNumber​(int num)
      • merge

        public void merge​(Histogram other)
        Merge two histograms.
        Parameters:
        other -
      • getTotalNumofSamples

        public int getTotalNumofSamples()
      • scaleToSamples

        public void scaleToSamples​(int usrSamples)
        Use the current distribution but scale the samples close to the user specified one
        Parameters:
        usrSamples -
      • getResult

        public int getResult​(int inx)