Class Histogram

java.lang.Object
org.apache.druid.query.aggregation.Histogram

public class Histogram extends Object
  • Field Details

    • breaks

      protected float[] breaks
    • bins

      protected long[] bins
    • count

      protected transient long count
    • min

      protected float min
    • max

      protected float max
  • Constructor Details

    • Histogram

      public Histogram(float[] breaks)
    • Histogram

      public Histogram(float[] breaks, long[] bins, float min, float max)
    • Histogram

      public Histogram(Histogram other)
  • Method Details

    • copyFrom

      public void copyFrom(Histogram other)
    • offer

      public void offer(float d)
    • fold

      public Histogram fold(Histogram h)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toBytes

      public byte[] toBytes()
    • asVisual

      public HistogramVisual asVisual()
      Returns a visual representation of a histogram object. Initially returns an array of just the min. and max. values but can also support the addition of quantiles.
      Returns:
      a visual representation of this histogram
    • fromBytes

      public static Histogram fromBytes(byte[] bytes)
    • fromBytes

      public static Histogram fromBytes(ByteBuffer buf)
    • toString

      public String toString()
      Overrides:
      toString in class Object