hep.aida.ref.histogram
Class VariableAxis
java.lang.Object
hep.aida.ref.histogram.VariableAxis
- All Implemented Interfaces:
- hep.aida.IAxis
public class VariableAxis
- extends Object
- implements hep.aida.IAxis
Variable-width axis; A reference implementation of hep.aida.IAxis.
Fields inherited from interface hep.aida.IAxis |
OVERFLOW_BIN, UNDERFLOW_BIN |
Constructor Summary |
VariableAxis(double[] edges)
Constructs and returns an axis with the given bin edges. |
VariableAxis
public VariableAxis(double[] edges)
- Constructs and returns an axis with the given bin edges.
Example: edges = (0.2, 1.0, 5.0) yields an axis with 2 in-range bins [0.2,1.0), [1.0,5.0) and 2 extra bins [-inf,0.2), [5.0,inf].
- Parameters:
edges
- the bin boundaries the partition shall have;
must be sorted ascending and must not contain multiple identical elements.
- Throws:
IllegalArgumentException
- if edges.length < 1.
binCenter
public double binCenter(int index)
- Specified by:
binCenter
in interface hep.aida.IAxis
binLowerEdge
public double binLowerEdge(int index)
- Specified by:
binLowerEdge
in interface hep.aida.IAxis
bins
public int bins()
- Specified by:
bins
in interface hep.aida.IAxis
binUpperEdge
public double binUpperEdge(int index)
- Specified by:
binUpperEdge
in interface hep.aida.IAxis
binWidth
public double binWidth(int index)
- Specified by:
binWidth
in interface hep.aida.IAxis
coordToIndex
public int coordToIndex(double coord)
- Specified by:
coordToIndex
in interface hep.aida.IAxis
lowerEdge
public double lowerEdge()
- Specified by:
lowerEdge
in interface hep.aida.IAxis
upperEdge
public double upperEdge()
- Specified by:
upperEdge
in interface hep.aida.IAxis
isFixedBinning
public boolean isFixedBinning()
- Specified by:
isFixedBinning
in interface hep.aida.IAxis
equals
public boolean equals(Object o)
- Check if two Axis are equal.
- Overrides:
equals
in class Object
- Parameters:
o
- the Object to check
- Returns:
true
if o
is an instance of FixedAxis and
it has the same number of bins, minimum and bin width.
jHepWork 3.1 ©