|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsuramadu.util.stats.HistogramBinSpec
This class is a container for HistogramBin classes. Each HistogramBin defines the specification for a single bin in a Histogram. It is the duty of the HistogramBinSpec to enforce consistency across all HistogramBins added to it, making sure that there are not overlaps, etc.
Constructor Summary | |
HistogramBinSpec()
Creates a new instance of HistogramBinSpec. |
|
HistogramBinSpec(byte loBound,
byte hiBound,
byte numBins)
Creates a new HistogramBinSpec using the specified loBound, hiBound, and numBins. |
|
HistogramBinSpec(java.lang.Comparable[] limits)
Creates a new HistogramBinSpec using an array of values organized as pairs of bounds, the even numbered elements being low bounds, and the odd numbered elements being high bounds (zero based). |
|
HistogramBinSpec(double loBound,
double hiBound,
double numBins)
Creates a new HistogramBinSpec using the specified loBound, hiBound, and numBins. |
|
HistogramBinSpec(float loBound,
float hiBound,
float numBins)
Creates a new HistogramBinSpec using the specified loBound, hiBound, and numBins. |
|
HistogramBinSpec(HistogramBin[] bins)
Creates a new HistogramBinSpec using the specified array of HistogramBins. |
|
HistogramBinSpec(int loBound,
int hiBound,
int numBins)
Creates a new HistogramBinSpec using the specified loBound, hiBound, and numBins. |
|
HistogramBinSpec(long loBound,
long hiBound,
long numBins)
Creates a new HistogramBinSpec using the specified loBound, hiBound, and numBins. |
|
HistogramBinSpec(java.lang.Number loBound,
java.lang.Number hiBound,
java.lang.Number numBins)
Creates a new HistogramBinSpec using the specified loBound, hiBound, and numBins. |
|
HistogramBinSpec(short loBound,
short hiBound,
short numBins)
Creates a new HistogramBinSpec using the specified loBound, hiBound, and numBins. |
Method Summary | |
boolean |
addBin(java.lang.Comparable loBound,
java.lang.Comparable hiBound)
Adds a bin to the HistogramBinspec. |
boolean |
addBin(HistogramBin bin)
Adds a bin to the HistogramBinspec. |
HistogramBin |
getBin(java.lang.Number n)
Find the HistogramBin in this HistogramBinSpec in which the specified Number object resides. |
HistogramBin |
getModeBin()
Get the HistogramBin whose count has the greatest value. |
java.util.Iterator |
iterator()
Get an iterator to the HistogramBin list in ascending range order |
java.lang.String |
toString()
Create a descriptive String that indicates the ranges and counts of all HistogramBins in this HistogramBinSpec |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public HistogramBinSpec()
public HistogramBinSpec(HistogramBin[] bins)
bins
- An array of HistogramBins from which to construct this HistogramBinSpec.HistogramBin
public HistogramBinSpec(int loBound, int hiBound, int numBins)
loBound
- The lowest bound of the HistogramBinSpechiBound
- The highest bound of the HistogramBinSpecnumBins
- The number of bins to create in this HistogramBinSpec (minus 2 for the bottom bin
and the top bin).public HistogramBinSpec(short loBound, short hiBound, short numBins)
loBound
- The lowest bound of the HistogramBinSpechiBound
- The highest bound of the HistogramBinSpecnumBins
- The number of bins to create in this HistogramBinSpec (minus 2 for the bottom bin
and the top bin).public HistogramBinSpec(byte loBound, byte hiBound, byte numBins)
loBound
- The lowest bound of the HistogramBinSpechiBound
- The highest bound of the HistogramBinSpecnumBins
- The number of bins to create in this HistogramBinSpec (minus 2 for the bottom bin
and the top bin).public HistogramBinSpec(long loBound, long hiBound, long numBins)
loBound
- The lowest bound of the HistogramBinSpechiBound
- The highest bound of the HistogramBinSpecnumBins
- The number of bins to create in this HistogramBinSpec (minus 2 for the bottom bin
and the top bin).public HistogramBinSpec(float loBound, float hiBound, float numBins)
loBound
- The lowest bound of the HistogramBinSpechiBound
- The highest bound of the HistogramBinSpecnumBins
- The number of bins to create in this HistogramBinSpec (minus 2 for the bottom bin
and the top bin).public HistogramBinSpec(double loBound, double hiBound, double numBins)
loBound
- The lowest bound of the HistogramBinSpechiBound
- The highest bound of the HistogramBinSpecnumBins
- The number of bins to create in this HistogramBinSpec (minus 2 for the bottom bin
and the top bin).public HistogramBinSpec(java.lang.Number loBound, java.lang.Number hiBound, java.lang.Number numBins)
loBound
- The lowest bound of the HistogramBinSpechiBound
- The highest bound of the HistogramBinSpecnumBins
- The number of bins to create in this HistogramBinSpec (minus 2 for the bottom bin
and the top bin).HistogramBin
public HistogramBinSpec(java.lang.Comparable[] limits)
limits
- an array of bounds, alternating between low bound and high bound for consecutive
and adjascent HistogramBins.Method Detail |
public boolean addBin(java.lang.Comparable loBound, java.lang.Comparable hiBound)
loBound
- the lower boundary of the HistogramBin to be created.hiBound
- the upper boundary of the HistogramBin to be created.
HistogramBin
,
Range
public boolean addBin(HistogramBin bin)
bin
- the HistogramBin to add to this HistogramBinSpec
HistogramBin
,
Range
public HistogramBin getBin(java.lang.Number n)
n
- A Number object for which to find the HistogramBin whose range encompasses it.
HistogramBin
public HistogramBin getModeBin()
HistogramBin
public java.util.Iterator iterator()
HistogramBin
public java.lang.String toString()
HistogramBin
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |