Package net.sf.basedb.util.plot
Class HistogramPlot.HistogramBin
java.lang.Object
net.sf.basedb.util.plot.HistogramPlot.HistogramBin
- All Implemented Interfaces:
Serializable
- Enclosing class:
- HistogramPlot
Represents a single bin in a histogram.
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private final double
private float
private float
private static final long
private float
private final double
private float
-
Constructor Summary
ModifierConstructorDescriptionprivate
HistogramBin
(float startX, float endX) Create a new HistogramBin. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
float
getStdev()
Get the standard deviation of all values in this bin.float
getSum()
Get the sum of all values in this bin.void
Increase the count value in this bin.
-
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 binendX
- 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 plottingHistogramPlot.YAggregate.COUNT
values. -
addMeasurement
public void addMeasurement(float y) Add a measurement to this bin. Used if plotting values other thanHistogramPlot.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 theHistogramPlot.YAggregate.COUNT
. -
getMean
public float getMean()Get the mean of all values in this bin. The mean is not available if plotting theHistogramPlot.YAggregate.COUNT
. -
getMin
public float getMin()Get the minumum of all values in this bin. The value is not available if plotting theHistogramPlot.YAggregate.COUNT
. -
getMax
public float getMax()Get the maximum of all values in this bin. The value is not available if plotting theHistogramPlot.YAggregate.COUNT
. -
getStdev
public float getStdev()Get the standard deviation of all values in this bin. The value is not available if plotting theHistogramPlot.YAggregate.COUNT
.
-