Class Histogram


  • public class Histogram
    extends java.lang.Object
    A set of sums or other histograms.
    Author:
    Steinar Knutsen
    • Constructor Summary

      Constructors 
      Constructor Description
      Histogram​(Limits limits)
      Build a new histogram using bucket limits from the given Limits object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(long n)  
      java.util.List<com.yahoo.statistics.Bucket> getBuckets()  
      long getSum()  
      boolean isLeaf()  
      double lowerLimit()
      The lower limit for the bucket this histogram represents.
      void put​(double[] value)
      Increment the corresponding bucket for this data point by 1.
      void put​(double[] value, int dim)
      Increment the corresponding bucket for this data point by 1.
      void reset()
      Reset all contained buckets.
      java.lang.String toString()  
      double upperLimit()
      The upper limit for the bucket this histogram represents.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Histogram

        public Histogram​(Limits limits)
        Build a new histogram using bucket limits from the given Limits object.
    • Method Detail

      • put

        public void put​(double[] value)
        Increment the corresponding bucket for this data point by 1.
      • put

        public void put​(double[] value,
                        int dim)
        Increment the corresponding bucket for this data point by 1.
        Parameters:
        dim - the index of the first value to consider in value array
      • toString

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

        public void reset()
        Reset all contained buckets.
      • lowerLimit

        public double lowerLimit()
        The lower limit for the bucket this histogram represents.
        Returns:
        the lower limit for the bucket this histogram represents
      • upperLimit

        public double upperLimit()
        The upper limit for the bucket this histogram represents.
        Returns:
        the upper limit for the bucket this histogram represents
      • getBuckets

        public java.util.List<com.yahoo.statistics.Bucket> getBuckets()
      • getSum

        public long getSum()
      • isLeaf

        public boolean isLeaf()
      • add

        public void add​(long n)