|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nist.microanalysis.Utility.Histogram
public class Histogram
A class for creating histograms of series of numbers. It is possible to override, bin(), minValue() and maxValue() to implement non-equally spaced bins. Alternatively, the user may implement a linearization function to take the users non-linear parameter into a linear parameter.
Copyright: Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain
Company: National Institute of Standards and Technology
| Constructor Summary | |
|---|---|
Histogram(double min,
double max,
int nBins)
Histogram - Creates a histogram representing the specified range with bins for over-range and under-range. |
|
| Method Summary | |
|---|---|
void |
add(double val)
add - Add the specified value to the histogram. |
void |
add(double[] vals)
add - Add the specified array of values to the histogram. |
int |
bin(double val)
bin - Returns the bin into which the val fits. |
int |
binCount()
binCount - Returns the number of bins (not counting over-range and under-range bins) |
java.lang.String |
binName(int bin,
java.lang.String format)
binName - Returns a string that describes the specified bin. |
int |
counts(int bin)
counts - Returns the number of counts in the specified bin. |
double |
maxValue(int bin)
maxValue - Returns the upper limit for values stored in this bin. |
double |
minValue(int bin)
minValue - Returns the minimum value stored in the specified bin |
int |
overrange()
overrange - Returns the number of events that fell into the overrange bin (larger than the max argument of the constructor.) |
int |
underrange()
underrange -Returns the number of events that fell into the underrange bin (less than the min argument of the constructor.) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Histogram(double min,
double max,
int nBins)
min - doublemax - doublenBins - int - The number of bins (excluding over- and under-range)| Method Detail |
|---|
public int bin(double val)
val - double
public double minValue(int bin)
bin - int
public double maxValue(int bin)
bin - int
public void add(double val)
val - doublepublic void add(double[] vals)
vals - double[]public int binCount()
public java.lang.String binName(int bin,
java.lang.String format)
bin - intformat - String
public int counts(int bin)
bin - int - 0 to binCount()
public int overrange()
public int underrange()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||