Interface BinMapper1d<T>

  • All Known Implementing Classes:
    Integer1dBinMapper, Real1dBinMapper

    public interface BinMapper1d<T>
    An interface for defining a bin mapping algorithm. Arbitrary values of type T are mapped to long indices. There are also bounds testing methods.
    Author:
    Barry DeZonia
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      BinMapper1d<T> copy()
      Returns a copy of this BinMapper1d<T>.
      long getBinCount()
      Returns the number of bins within this bin mapping distribution.
      void getCenterValue​(long binPos, T value)
      Gets the data value associated with the center of a bin.
      void getLowerBound​(long binPos, T value)
      Gets the data value associated with the left edge of a bin.
      void getUpperBound​(long binPos, T value)
      Gets the data value associated with the right edge of a bin.
      boolean hasTails()
      Returns true if this bin mapping has bins on the ends of the distribution that count out of bounds values.
      boolean includesLowerBound​(long binPos)
      Returns true if values matching the left edge data value for a given bin are counted in the distribution.
      boolean includesUpperBound​(long binPos)
      Returns true if values matching the right edge data value for a given bin are counted in the distribution.
      long map​(T value)
      Converts a data value to a long index within the bin distribution.
    • Method Detail

      • hasTails

        boolean hasTails()
        Returns true if this bin mapping has bins on the ends of the distribution that count out of bounds values.
      • getBinCount

        long getBinCount()
        Returns the number of bins within this bin mapping distribution.
      • map

        long map​(T value)
        Converts a data value to a long index within the bin distribution.
      • getCenterValue

        void getCenterValue​(long binPos,
                            T value)
        Gets the data value associated with the center of a bin.
        Parameters:
        binPos -
        value - Output to contain center data value
      • getLowerBound

        void getLowerBound​(long binPos,
                           T value)
        Gets the data value associated with the left edge of a bin.
        Parameters:
        binPos - Bin number of interest
        value - Output to contain left edge data value
      • getUpperBound

        void getUpperBound​(long binPos,
                           T value)
        Gets the data value associated with the right edge of a bin.
        Parameters:
        binPos - Bin number of interest
        value - Output to contain right edge data value
      • includesUpperBound

        boolean includesUpperBound​(long binPos)
        Returns true if values matching the right edge data value for a given bin are counted in the distribution. Basically is this bin interval closed on the right or not.
        Parameters:
        binPos - Bin number of interest
      • includesLowerBound

        boolean includesLowerBound​(long binPos)
        Returns true if values matching the left edge data value for a given bin are counted in the distribution. Basically is this bin interval closed on the left or not.
        Parameters:
        binPos - Bin number of interest
      • copy

        BinMapper1d<T> copy()
        Returns a copy of this BinMapper1d<T>.