cern.hep.aida.ref
Class VariableAxis
java.lang.Object
cern.hep.aida.ref.VariableAxis
- All Implemented Interfaces:
- colt.hep.aida.IAxis, java.io.Serializable
public class VariableAxis
- extends java.lang.Object
- implements colt.hep.aida.IAxis
Variable-width axis; A reference implementation of hep.aida.IAxis.
- See Also:
- Serialized Form
Fields inherited from interface colt.hep.aida.IAxis |
serialVersionUID |
Constructor Summary |
VariableAxis(double[] edges)
Constructs and returns an axis with the given bin edges. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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:
java.lang.IllegalArgumentException
- if edges.length < 1.
binCentre
public double binCentre(int index)
- Specified by:
binCentre
in interface colt.hep.aida.IAxis
binLowerEdge
public double binLowerEdge(int index)
- Specified by:
binLowerEdge
in interface colt.hep.aida.IAxis
bins
public int bins()
- Specified by:
bins
in interface colt.hep.aida.IAxis
binUpperEdge
public double binUpperEdge(int index)
- Specified by:
binUpperEdge
in interface colt.hep.aida.IAxis
binWidth
public double binWidth(int index)
- Specified by:
binWidth
in interface colt.hep.aida.IAxis
coordToIndex
public int coordToIndex(double coord)
- Specified by:
coordToIndex
in interface colt.hep.aida.IAxis
lowerEdge
public double lowerEdge()
- Specified by:
lowerEdge
in interface colt.hep.aida.IAxis
upperEdge
public double upperEdge()
- Specified by:
upperEdge
in interface colt.hep.aida.IAxis
jHepWork 1.7 (C) Chekanov