Class HistogramPlot.HistogramBin

java.lang.Object
net.sf.basedb.util.plot.HistogramPlot.HistogramBin
All Implemented Interfaces:
Serializable
Enclosing class:
HistogramPlot

private static class HistogramPlot.HistogramBin extends Object implements Serializable
Represents a single bin in a histogram.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
     
    private final double
     
    private float
     
    private float
     
    private static final long
     
    private float
     
    private final double
     
    private float
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    HistogramBin(float startX, float endX)
    Create a new HistogramBin.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addMeasurement(float y)
    Add a measurement to this bin.
    float
    Get the number of values in this bin.
    double
     
    float
    Get the maximum of all values in this bin.
    float
    Get the mean of all values in this bin.
    float
    Get the minumum of all values in this bin.
    double
     
    float
    Get the standard deviation of all values in this bin.
    float
    Get the sum of all values in this bin.
    void
    Increase the count value in this bin.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • startX

      private final double startX
    • endX

      private final double endX
    • count

      private int count
    • sum

      private float sum
    • squaredSum

      private float squaredSum
    • min

      private float min
    • max

      private float max
  • Constructor Details

    • HistogramBin

      private HistogramBin(float startX, float endX)
      Create a new HistogramBin.
      Parameters:
      startX - The min x-axis values for this bin
      endX - The max x-axis value for this bin
  • Method Details

    • getStartX

      public double getStartX()
    • getEndX

      public double getEndX()
    • increaseCount

      public void increaseCount()
      Increase the count value in this bin. Used if plotting HistogramPlot.YAggregate.COUNT values.
    • addMeasurement

      public void addMeasurement(float y)
      Add a measurement to this bin. Used if plotting values other than HistogramPlot.YAggregate.COUNT. This method increases the count and updates the sum, max and min values as required.
      Parameters:
      y - The y value to add
    • getCount

      public float getCount()
      Get the number of values in this bin.
    • getSum

      public float getSum()
      Get the sum of all values in this bin. The sum is not available if plotting the HistogramPlot.YAggregate.COUNT.
    • getMean

      public float getMean()
      Get the mean of all values in this bin. The mean is not available if plotting the HistogramPlot.YAggregate.COUNT.
    • getMin

      public float getMin()
      Get the minumum of all values in this bin. The value is not available if plotting the HistogramPlot.YAggregate.COUNT.
    • getMax

      public float getMax()
      Get the maximum of all values in this bin. The value is not available if plotting the HistogramPlot.YAggregate.COUNT.
    • getStdev

      public float getStdev()
      Get the standard deviation of all values in this bin. The value is not available if plotting the HistogramPlot.YAggregate.COUNT.