Interface Histogram

  • All Superinterfaces:
    DataSet, DataSetMetaData, EventSource, java.io.Serializable
    All Known Subinterfaces:
    CategoryHistogram, Histogram1D
    All Known Implementing Classes:
    AbstractHistogram, Histogram, Histogram2

    public interface Histogram
    extends DataSet, DataSetMetaData
    Specialized DataSet interface for storing and processing Histogram data. A histogram with bins 1...N is defined by n+1 values defining the steps between the bins. The bins can be equidistant or not. The bins 0 and N+1 have a special meaning and contain the data for data which is out of range. They are not drawn by default.
    Author:
    rstein
    • Method Detail

      • addBinContent

        void addBinContent​(int bin)
        Increment bin content by 1. More...
        Parameters:
        bin - global bin ID
      • addBinContent

        void addBinContent​(int bin,
                           double w)
        Increment bin content by a weight w. More...
        Parameters:
        bin - global bin ID
        w - weight
      • findBin

        int findBin​(double x,
                    double y)
        Parameters:
        x - spatial real-valued coordinate in X
        y - spatial real-valued coordinate in Y
        Returns:
        bin index corresponding to spatial x and y coordinates
      • findBin

        int findBin​(double x,
                    double y,
                    double z)
        Parameters:
        x - spatial real-valued coordinate in X
        y - spatial real-valued coordinate in Y
        z - spatial real-valued coordinate in Z
        Returns:
        bin index corresponding to spatial x, y and z coordinates
      • findBin

        int findBin​(int dimIndex,
                    double x)
        Parameters:
        dimIndex - the dimension index
        x - spatial real-valued coordinate for dimension dimIndex
        Returns:
        bin index corresponding to spatial x and y coordinates
      • getBinCenter

        double getBinCenter​(int dimIndex,
                            int binIndex)
        Parameters:
        dimIndex - the dimension index
        binIndex - index
        Returns:
        bin centre for axis with dimIndex
      • getBinCount

        int getBinCount​(int dimIndex)
        Parameters:
        dimIndex - the dimension index
        Returns:
        the number of bins for the given dimIndex (includes the under- and over-flow bin)
      • getBinLimits

        double getBinLimits​(int dimIndex,
                            Histogram.Boundary boundary,
                            int binIndex)
        Parameters:
        dimIndex - the dimension index
        boundary - for upper or lower bound limits
        binIndex - index
        Returns:
        bin limits for axis and upper/lower bound for dimIndex bin
      • getBinContent

        double getBinContent​(int bin)
        Return content of bin number bin. Convention for numbering bins For all histogram types: nbins, xlow, xup bin = 0; underflow bin bin = 1; first bin with low-edge xlow INCLUDED bin = nbins; last bin with upper-edge xup EXCLUDED bin = nbins+1; overflow bin
        Parameters:
        bin - the index
        Returns:
        numeric bin content
      • isEquiDistant

        boolean isEquiDistant()
        Returns:
        true if bin sizes are equal
      • reset

        void reset()
        reset histogram content