public class DoubleHistogram1D extends Object implements DoubleIHistogram1D
OVERFLOW, UNDERFLOW
Constructor and Description |
---|
DoubleHistogram1D(String title,
double[] edges)
Creates a variable-width histogram.
|
DoubleHistogram1D(String title,
DoubleIAxis axis)
Creates a histogram with the given axis binning.
|
DoubleHistogram1D(String title,
int bins,
double min,
double max)
Creates a fixed-width histogram.
|
Modifier and Type | Method and Description |
---|---|
int |
allEntries()
Number of all entries in all (both in-range and under/overflow) bins in
the histogram.
|
int |
binEntries(int index)
Number of entries in the corresponding bin (ie the number of times fill
was called for this bin).
|
double |
binError(int index)
The error on this bin.
|
double |
binHeight(int index)
Total height of the corresponding bin (ie the sum of the weights in this
bin).
|
int |
dimensions()
Returns 1 for one-dimensional histograms, 2 for two-dimensional
histograms, and so on.
|
int |
entries()
Number of in-range entries in the histogram.
|
double |
equivalentBinEntries()
Number of equivalent entries.
|
int |
extraEntries()
Number of under and overflow entries in the histogram.
|
void |
fill_2D(double[] data,
double[] weights,
int rows,
int columns,
int zero,
int rowStride,
int columnStride)
Fill histogram with specified data and weights.
|
void |
fill_2D(double[] data,
int rows,
int columns,
int zero,
int rowStride,
int columnStride)
Fill histogram with specified data and weight 1.
|
void |
fill(double x)
Fill histogram with weight 1.
|
void |
fill(double x,
double weight)
Fill histogram with specified weight.
|
DoubleHistogram1DContents |
getContents()
Returns the contents of this histogram.
|
double |
mean()
Returns the mean of the whole histogram as calculated on filling-time.
|
int[] |
minMaxBins()
Indexes of the in-range bins containing the smallest and largest
binHeight(), respectively.
|
void |
reset()
Reset contents; as if just constructed.
|
double |
rms()
Returns the rms of the whole histogram as calculated on filling-time.
|
void |
setContents(DoubleHistogram1DContents contents)
Sets the contents of this histogram.
|
double |
sumAllBinHeights()
Sum of all (both in-range and under/overflow) bin heights in the
histogram.
|
double |
sumBinHeights()
Sum of in-range bin heights in the histogram.
|
double |
sumExtraBinHeights()
Sum of under/overflow bin heights in the histogram.
|
String |
title()
Title of the histogram (will be set only in the constructor).
|
DoubleIAxis |
xAxis()
Returns the X Axis.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
minMaxBins, xAxis
dimensions, entries, extraEntries, sumAllBinHeights, sumBinHeights, sumExtraBinHeights, title
public DoubleHistogram1D(String title, double[] edges)
title
- The histogram title.edges
- the bin boundaries the axis shall have; must be sorted
ascending and must not contain multiple identical elements.IllegalArgumentException
- if edges.length < 1.public DoubleHistogram1D(String title, DoubleIAxis axis)
title
- The histogram title.axis
- The axis description to be used for binning.public DoubleHistogram1D(String title, int bins, double min, double max)
title
- The histogram title.bins
- The number of bins.min
- The minimum value on the X axis.max
- The maximum value on the X axis.public int allEntries()
DoubleIHistogram
allEntries
in interface DoubleIHistogram
public int binEntries(int index)
DoubleIHistogram1D
binEntries
in interface DoubleIHistogram1D
index
- the bin number (0...N-1) or OVERFLOW or UNDERFLOW.public double binError(int index)
DoubleIHistogram1D
binError
in interface DoubleIHistogram1D
index
- the bin number (0...N-1) or OVERFLOW or UNDERFLOW.public double binHeight(int index)
DoubleIHistogram1D
binHeight
in interface DoubleIHistogram1D
index
- the bin number (0...N-1) or OVERFLOW or UNDERFLOW.public double equivalentBinEntries()
DoubleIHistogram
equivalentBinEntries
in interface DoubleIHistogram
public void fill(double x)
DoubleIHistogram1D
fill
in interface DoubleIHistogram1D
public void fill(double x, double weight)
DoubleIHistogram1D
fill
in interface DoubleIHistogram1D
public void fill_2D(double[] data, int rows, int columns, int zero, int rowStride, int columnStride)
DoubleIHistogram1D
fill_2D
in interface DoubleIHistogram1D
public void fill_2D(double[] data, double[] weights, int rows, int columns, int zero, int rowStride, int columnStride)
DoubleIHistogram1D
fill_2D
in interface DoubleIHistogram1D
public DoubleHistogram1DContents getContents()
public double mean()
DoubleIHistogram1D
mean
in interface DoubleIHistogram1D
public void reset()
DoubleIHistogram
reset
in interface DoubleIHistogram
public double rms()
DoubleIHistogram1D
rms
in interface DoubleIHistogram1D
public void setContents(DoubleHistogram1DContents contents)
contents
- public int dimensions()
DoubleIHistogram
dimensions
in interface DoubleIHistogram
public int entries()
DoubleIHistogram
entries
in interface DoubleIHistogram
public int extraEntries()
DoubleIHistogram
extraEntries
in interface DoubleIHistogram
public int[] minMaxBins()
DoubleIHistogram1D
minMaxBins
in interface DoubleIHistogram1D
public double sumAllBinHeights()
DoubleIHistogram
sumAllBinHeights
in interface DoubleIHistogram
public double sumBinHeights()
DoubleIHistogram
sumBinHeights
in interface DoubleIHistogram
public double sumExtraBinHeights()
DoubleIHistogram
sumExtraBinHeights
in interface DoubleIHistogram
public DoubleIAxis xAxis()
DoubleIHistogram1D
xAxis
in interface DoubleIHistogram1D
public String title()
DoubleIHistogram
title
in interface DoubleIHistogram
Jump to the Parallel Colt Homepage