2.17.2: 2011-06-17

net.sf.basedb.util.plot
Class HistogramPlot.HistogramBin

java.lang.Object
  extended by 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
private  int count
           
private  double endX
           
private  float max
           
private  float min
           
private static long serialVersionUID
           
private  float squaredSum
           
private  double startX
           
private  float sum
           
 
Constructor Summary
private HistogramPlot.HistogramBin(float startX, float endX)
          Create a new HistogramBin.
 
Method Summary
 void addMeasurement(float y)
          Add a measurement to this bin.
 float getCount()
          Get the number of values in this bin.
 double getEndX()
           
 float getMax()
          Get the maximum of all values in this bin.
 float getMean()
          Get the mean of all values in this bin.
 float getMin()
          Get the minumum of all values in this bin.
 double getStartX()
           
 float getStdev()
          Get the standard deviation of all values in this bin.
 float getSum()
          Get the sum of all values in this bin.
 void increaseCount()
          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 Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

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 Detail

HistogramPlot.HistogramBin

private HistogramPlot.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 Detail

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.


2.17.2: 2011-06-17