Package pamMaths

Class PamLogHistogram

All Implemented Interfaces:
Cloneable

public class PamLogHistogram extends PamHistogram
  • Constructor Details

    • PamLogHistogram

      public PamLogHistogram(double minVal, double maxVal, int nBins)
    • PamLogHistogram

      public PamLogHistogram(double minVal, double maxVal, int nBins, boolean binCentres)
      Parameters:
      minVal -
      maxVal -
      nBins -
      binCentres -
  • Method Details

    • getBin

      public int getBin(double dataValue)
      Description copied from class: PamHistogram
      Work out which bin a particular value will call into. N.B. This may return invalid input: '<' 0 or >= getNBins() if the data fall outsied the range of the histogram
      Overrides:
      getBin in class PamHistogram
      Returns:
      bin Bumber
    • getBinCentre

      public double getBinCentre(int iBin)
      Overrides:
      getBinCentre in class PamHistogram
    • addData

      public void addData(double newData, boolean notify)
      Description copied from class: PamHistogram
      Add a single unit value to the histogram and optionally notify all observers
      Overrides:
      addData in class PamHistogram
      Parameters:
      newData - value of the new data
    • addData

      public void addData(double newData)
      Description copied from class: PamHistogram
      Add a single point of data to the histogram but don't notify observers
      Overrides:
      addData in class PamHistogram
      Parameters:
      newData - new data point
    • addData

      public void addData(double newData, double weight)
      Description copied from class: PamHistogram
      Add weighted data to the histogram
      Overrides:
      addData in class PamHistogram
      Parameters:
      newData - value of the data
      weight - weight to apply
    • getMean

      public double getMean()
      Description copied from class: PamHistogram
      Calculate the mean of the histogram data
      Overrides:
      getMean in class PamHistogram
      Returns:
      mean value
    • getMaxVal

      public double getMaxVal()
      Description copied from class: PamHistogram
      Get the maximum range value of the histogram
      Overrides:
      getMaxVal in class PamHistogram
      Returns:
      max value
    • getMinVal

      public double getMinVal()
      Description copied from class: PamHistogram
      Get the minimum range value of the histogram
      Overrides:
      getMinVal in class PamHistogram
      Returns:
      min value
    • getScaleMinVal

      public double getScaleMinVal()
      Description copied from class: PamHistogram
      Where to plot from if bin centres were specified.
      Overrides:
      getScaleMinVal in class PamHistogram
      Returns:
      minimum value for plot axis
    • getScaleMaxVal

      public double getScaleMaxVal()
      Description copied from class: PamHistogram
      Where to plot to if bin centres were specified.
      Overrides:
      getScaleMaxVal in class PamHistogram
      Returns:
      maximum value for plot axis
    • getBinCentreValues

      public double[] getBinCentreValues()
      Description copied from class: PamHistogram
      Get the centre value of every bin
      Overrides:
      getBinCentreValues in class PamHistogram
      Returns:
      array of bin centres.
    • getBinEdgeValues

      public double[] getBinEdgeValues()
      Description copied from class: PamHistogram
      Get an array of bin edges. This will be one longer than the number of bins
      Overrides:
      getBinEdgeValues in class PamHistogram
      Returns:
      array of bin edge values.