org.omegahat.Graphics.Plots.DataStructures
Class HistogramBin

java.lang.Object
  |
  +--org.omegahat.Graphics.Plots.DataStructures.HistogramBin
All Implemented Interfaces:
DynamicHistogramBinInt, HistogramBinInt

public class HistogramBin
extends java.lang.Object
implements HistogramBinInt, DynamicHistogramBinInt

the primitive element of a histogram description, storing the location and height/count for an individual segment or bin.

This provides information about the height of the bin and its left-to-right range.


Field Summary
protected  double height
          The value (frequency or count, etc) of this segement.
protected  double[] range
          The interval covered by this segmnent.
protected  double[] values
           
 
Fields inherited from interface org.omegahat.Graphics.Plots.DataStructures.HistogramBinInt
MAX, MIN
 
Constructor Summary
HistogramBin(double[] range, double height)
           
HistogramBin(double min, double max)
           
HistogramBin(double min, double max, double height)
           
 
Method Summary
 double addValue()
          Increment the count for this bin, adjusting the height according to the scale (that is, count or frequency).
 double height()
          The height of the bin, or y coordinate of the top of the bin.
 double height(double h)
           
 double[] range()
          The start and end point of the bin.
 double[] range(double[] v)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

range

protected double[] range
The interval covered by this segmnent.

height

protected double height
The value (frequency or count, etc) of this segement.

values

protected double[] values
Constructor Detail

HistogramBin

public HistogramBin(double[] range,
                    double height)

HistogramBin

public HistogramBin(double min,
                    double max)

HistogramBin

public HistogramBin(double min,
                    double max,
                    double height)
Method Detail

range

public double[] range()
Description copied from interface: HistogramBinInt
The start and end point of the bin.
Specified by:
range in interface HistogramBinInt

range

public double[] range(double[] v)

height

public double height()
Description copied from interface: HistogramBinInt
The height of the bin, or y coordinate of the top of the bin.
Specified by:
height in interface HistogramBinInt

height

public double height(double h)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addValue

public double addValue()
Description copied from interface: DynamicHistogramBinInt
Increment the count for this bin, adjusting the height according to the scale (that is, count or frequency).
Specified by:
addValue in interface DynamicHistogramBinInt