Class FixedAxis
java.lang.Object
hep.aida.ref.FixedAxis
- All Implemented Interfaces:
IAxis, Serializable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate doubleprivate doubleprivate intprivate intFields inherited from interface IAxis
serialVersionUID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublebinCentre(int index) Centre of the bin specified.doublebinLowerEdge(int index) Lower edge of the specified bin.intbins()The number of bins (excluding underflow and overflow) on the axis.doublebinUpperEdge(int index) Upper edge of the specified bin.doublebinWidth(int index) Width of the bin specified.intcoordToIndex(double coord) Converts a coordinate on the axis to a bin number.doubleLower axis edge.doubleUpper axis edge.(package private) intxgetBin(double coord) This package private method is similar to coordToIndex except that it returns our internal definition for overflow/underflow(package private) intxmap(int index) Package private method to map from the external representation of bin number to our internal representation of bin number
-
Field Details
-
bins
private int bins -
min
private double min -
binWidth
private double binWidth -
xunder
private int xunder -
xover
private int xover
-
-
Constructor Details
-
FixedAxis
public FixedAxis(int bins, double min, double max) Create an Axis- Parameters:
bins- Number of binsmin- Minimum for axismax- Maximum for axis
-
-
Method Details
-
binCentre
-
binLowerEdge
public double binLowerEdge(int index) Description copied from interface:IAxisLower edge of the specified bin.- Specified by:
binLowerEdgein interfaceIAxis- Parameters:
index- Bin number (0...bins()-1) or OVERFLOW or UNDERFLOW.- Returns:
- the lower edge of the bin; for the underflow bin this is Double.NEGATIVE_INFINITY.
-
bins
-
binUpperEdge
public double binUpperEdge(int index) Description copied from interface:IAxisUpper edge of the specified bin.- Specified by:
binUpperEdgein interfaceIAxis- Parameters:
index- Bin number (0...bins()-1) or OVERFLOW or UNDERFLOW.- Returns:
- the upper edge of the bin; for the overflow bin this is Double.POSITIVE_INFINITY.
-
binWidth
-
coordToIndex
public int coordToIndex(double coord) Description copied from interface:IAxisConverts a coordinate on the axis to a bin number. If the coordinate is invalid input: '<' lowerEdge returns UNDERFLOW, and if the coordinate is >= upperEdge returns OVERFLOW.- Specified by:
coordToIndexin interfaceIAxis
-
lowerEdge
-
upperEdge
-
xgetBin
int xgetBin(double coord) This package private method is similar to coordToIndex except that it returns our internal definition for overflow/underflow -
xmap
int xmap(int index) Package private method to map from the external representation of bin number to our internal representation of bin number
-