Class FloatHistogram

  • All Implemented Interfaces:
    java.io.Serializable

    public class FloatHistogram
    extends java.lang.Object
    implements java.io.Serializable
    Maintains histogram buckets that are constant width in base-2 floating point representation space. This is close to exponential binning, but should be much faster.
    See Also:
    Serialized Form
    • Field Detail

      • counts

        private long[] counts
      • min

        private double min
      • max

        private double max
      • bitsOfPrecision

        private int bitsOfPrecision
      • shift

        private int shift
      • offset

        private int offset
    • Constructor Detail

      • FloatHistogram

        FloatHistogram()
      • FloatHistogram

        public FloatHistogram​(double min,
                              double max)
      • FloatHistogram

        public FloatHistogram​(double min,
                              double max,
                              double binsPerDecade)
    • Method Detail

      • bucket

        int bucket​(double x)
      • bucketIndex

        private int bucketIndex​(double x)
      • lowerBound

        private double lowerBound​(int k)
      • add

        public void add​(double v)
      • getBounds

        public double[] getBounds()
      • getCounts

        public long[] getCounts()
      • getCompressedCounts

        public long[] getCompressedCounts()
      • writeObject

        public void writeObject​(java.io.ObjectOutputStream out)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • readObject

        public void readObject​(java.io.ObjectInputStream in)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • readObjectNoData

        private void readObjectNoData()
                               throws java.io.ObjectStreamException
        Throws:
        java.io.ObjectStreamException