|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsuramadu.util.stats.Histogram
A class to facilitate the creation of a histogram data structure for examining the distribution of various kinds of numeric data.
Constructor Summary | |
Histogram(byte loBound,
byte hiBound,
byte numBins,
java.util.Collection c)
Creates a new instance of Histogram with the specified low bound, high bound, and numBins, with the specified Collection. |
|
Histogram(java.lang.Comparable[] bounds)
Creates a new instance of Histogram 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). |
|
Histogram(java.lang.Comparable[] bounds,
java.util.Collection c)
Creates a new instance of Histogram with the specified Collection. |
|
Histogram(java.lang.Comparable[] bounds,
java.lang.Number[] nArray)
Creates a new instance of Histogram with the specified array of Number Objects. |
|
Histogram(double loBound,
double hiBound,
double numBins,
java.util.Collection c)
Creates a new instance of Histogram with the specified low bound, high bound, and numBins, with the specified Collection. |
|
Histogram(float loBound,
float hiBound,
float numBins,
java.util.Collection c)
Creates a new instance of Histogram with the specified low bound, high bound, and numBins, with the specified Collection. |
|
Histogram(HistogramBinSpec binSpec)
Creates a new instance of Histogram using the specified HistogramBinSpec |
|
Histogram(HistogramBinSpec binSpec,
java.util.Collection c)
Creates a new instance of Histogram using the specified HistogramBinSpec with the specified Collection. |
|
Histogram(int loBound,
int hiBound,
int numBins,
java.util.Collection c)
Creates a new instance of Histogram with the specified low bound, high bound, and numBins, with the specified Collection. |
|
Histogram(long loBound,
long hiBound,
long numBins,
java.util.Collection c)
Creates a new instance of Histogram with the specified low bound, high bound, and numBins, with the specified Collection. |
|
Histogram(short loBound,
short hiBound,
short numBins,
java.util.Collection c)
Creates a new instance of Histogram with the specified low bound, high bound, and numBins, with the specified Collection. |
Method Summary | |
void |
add(java.lang.Number n)
Adds a Number Object to this Histogram |
HistogramBin |
getMode()
Gets the HistogramBin from this Histogram that contains the most values. |
static void |
main(java.lang.String[] args)
Test method for unit testing. |
java.lang.String |
toString()
Creates a String representation for this Histogram. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Histogram(int loBound, int hiBound, int numBins, java.util.Collection c)
loBound
- the lowest bound for this HistogramhiBound
- the highest bound for this HistogramnumBins
- the number of HistogramBins to create in this Histogramc
- a Collection of like Objects that implement the java.lang.Comparable interface to
be collated into this Histogram.Comparable
,
Collection
,
HistogramBinSpec
public Histogram(short loBound, short hiBound, short numBins, java.util.Collection c)
loBound
- the lowest bound for this HistogramhiBound
- the highest bound for this HistogramnumBins
- the number of HistogramBins to create in this Histogramc
- a Collection of like Objects that implement the java.lang.Comparable interface to
be collated into this Histogram.Comparable
,
Collection
,
HistogramBinSpec
public Histogram(byte loBound, byte hiBound, byte numBins, java.util.Collection c)
loBound
- the lowest bound for this HistogramhiBound
- the highest bound for this HistogramnumBins
- the number of HistogramBins to create in this Histogramc
- a Collection of like Objects that implement the java.lang.Comparable interface to
be collated into this Histogram.Comparable
,
Collection
,
HistogramBinSpec
public Histogram(long loBound, long hiBound, long numBins, java.util.Collection c)
loBound
- the lowest bound for this HistogramhiBound
- the highest bound for this HistogramnumBins
- the number of HistogramBins to create in this Histogramc
- a Collection of like Objects that implement the java.lang.Comparable interface to
be collated into this Histogram.Comparable
,
Collection
,
HistogramBinSpec
public Histogram(float loBound, float hiBound, float numBins, java.util.Collection c)
loBound
- the lowest bound for this HistogramhiBound
- the highest bound for this HistogramnumBins
- the number of HistogramBins to create in this Histogramc
- a Collection of like Objects that implement the java.lang.Comparable interface to
be collated into this Histogram.Comparable
,
Collection
,
HistogramBinSpec
public Histogram(double loBound, double hiBound, double numBins, java.util.Collection c)
loBound
- the lowest bound for this HistogramhiBound
- the highest bound for this HistogramnumBins
- the number of HistogramBins to create in this Histogramc
- a Collection of like Objects that implement the java.lang.Comparable interface to
be collated into this Histogram.Comparable
,
Collection
,
HistogramBinSpec
public Histogram(HistogramBinSpec binSpec)
binSpec
- an instance of a HistogramBinSpec for this HistogramHistogramBinSpec
public Histogram(HistogramBinSpec binSpec, java.util.Collection c)
binSpec
- an instance of a HistogramBinSpec for this Histogramc
- a Collection of like Objects that implement the java.lang.Comparable interfaceComparable
,
Collection
,
HistogramBinSpec
public Histogram(java.lang.Comparable[] bounds)
bounds
- an array of bounds, alternating between low bound and high bound for consecutive
and adjascent HistogramBins.public Histogram(java.lang.Comparable[] bounds, java.util.Collection c)
bounds
- an array of bounds, alternating between low bound and high bound for consecutive
and adjascent HistogramBins.c
- a Collection of like Objects that implement the java.lang.Comparable interfacepublic Histogram(java.lang.Comparable[] bounds, java.lang.Number[] nArray)
bounds
- an array of bounds, alternating between low bound and high bound for consecutive
and adjascent HistogramBins.nArray
- an array of like Number Objects.Method Detail |
public static void main(java.lang.String[] args)
args
- the usual main() args.public void add(java.lang.Number n)
n
- the Number object to add.public HistogramBin getMode()
HistogramBin
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |