|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Utils.BasicHist
public class BasicHist
A simple histogram class to count the frequency of values of a parameter of interest.
Field Summary | |
---|---|
(package private) int[] |
bins
|
(package private) double |
hi
|
(package private) double |
lo
|
(package private) int |
numBins
|
(package private) double |
range
|
Constructor Summary | |
---|---|
BasicHist(int numBins,
double lo,
double hi)
The constructor will create an array of a given number of bins. |
Method Summary | |
---|---|
void |
add(double x)
Takes the value x as input and places it in the according bin |
void |
clear()
Clear the histogram bins. |
int |
getValue(int bin)
Provides access to the bins |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
int[] bins
int numBins
double lo
double hi
double range
Constructor Detail |
---|
public BasicHist(int numBins, double lo, double hi)
numBins
- Number of bins for the histogramlo
- The lower limit of the histogramhi
- The upper limit of the histogramMethod Detail |
---|
public void add(double x)
x
- public void clear()
public int getValue(int bin)
bin
- the index of the bin that is queried
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |