public class Histogram extends Object
Constructor and Description |
---|
Histogram(String name,
int nbins,
double min,
double max) |
Histogram(String name,
int nbins,
cern.colt.matrix.DoubleMatrix1D data) |
Modifier and Type | Method and Description |
---|---|
int |
entries()
The number of entries in the histogram (the number of times fill has been called).
|
void |
fill(double x)
Fill the histogram with x.
|
void |
fill(cern.colt.matrix.DoubleMatrix1D ghr) |
void |
fill(int binNum,
int count)
Add the given number of counts to the given bin.
|
Double |
getApproximateQuantile(int q)
Find the bin below which i% of the values are contained.
|
double[] |
getArray()
Returns the bin heights.
|
int |
getBiggestBinSize() |
Double[] |
getBinEdges() |
String[] |
getBinEdgesStrings() |
int |
getBinOf(double x) |
String |
getName()
The name of the histogram.
|
double |
max() |
double |
min() |
int |
numberOfBins()
Get the number of bins in the histogram.
|
double |
overflow()
The height of the overflow bin.
|
org.jfree.data.xy.XYSeries |
plot()
Provide graph for JFreePlot; counts expressed as a fraction.
|
double |
stepSize() |
double |
underflow()
The height of the underflow bin.
|
void |
writeToFile(FileWriter out)
Write the histogram to a file.
|
public Histogram(String name, int nbins, double min, double max)
name
- nbins
- min
- max
- public Histogram(String name, int nbins, cern.colt.matrix.DoubleMatrix1D data)
name
- nbins
- data
- public int entries()
public void fill(double x)
x
- is the value to add in to the histogrampublic void fill(cern.colt.matrix.DoubleMatrix1D ghr)
ghr
- public void fill(int binNum, int count)
binNum
- count
- public Double getApproximateQuantile(int q)
q
- public double[] getArray()
public int getBiggestBinSize()
public Double[] getBinEdges()
public String[] getBinEdgesStrings()
public int getBinOf(double x)
x
- public String getName()
public double max()
public double min()
public int numberOfBins()
public double overflow()
public org.jfree.data.xy.XYSeries plot()
public double stepSize()
public double underflow()
public void writeToFile(FileWriter out) throws IOException
bin (lower edge), number in bin.
out
- IOException
Copyright © 2003–2023 UBC Michael Smith Laboratories. All rights reserved.