Class DoubleHistogram

  • All Implemented Interfaces:
    Histogram
    Direct Known Subclasses:
    DoubleDynamicHistogram

    public class DoubleHistogram
    extends AbstractStaticHistogram
    Histogram class storing double values.

    The histogram will start with "bin" bins, but it can grow dynamically to the left and right.

    Since:
    0.5.5
    Author:
    Erich Schubert
    • Field Detail

      • data

        double[] data
        Data store
    • Constructor Detail

      • DoubleHistogram

        public DoubleHistogram​(int bins,
                               double min,
                               double max)
        Constructor.
        Parameters:
        bins - Number of bins
        min - Cover minimum
        max - Cover maximum
    • Method Detail

      • increment

        public void increment​(double coord,
                              double val)
        Increment the value of a bin.
        Parameters:
        coord - Coordinate
        val - Value
      • get

        public double get​(double coord)
        Get the value at a particular position.
        Parameters:
        coord - Coordinate
        Returns:
        Value