Package hep.aida.ref
Class FixedAxis
java.lang.Object
hep.aida.ref.FixedAxis
- All Implemented Interfaces:
IAxis
,Serializable
Fixed-width axis; A reference implementation of hep.aida.IAxis.
- Version:
- 1.0, 23/03/2000
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private double
private double
private int
private int
Fields inherited from interface hep.aida.IAxis
serialVersionUID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
binCentre
(int index) Centre of the bin specified.double
binLowerEdge
(int index) Lower edge of the specified bin.int
bins()
The number of bins (excluding underflow and overflow) on the axis.double
binUpperEdge
(int index) Upper edge of the specified bin.double
binWidth
(int index) Width of the bin specified.int
coordToIndex
(double coord) Converts a coordinate on the axis to a bin number.double
Lower axis edge.double
Upper axis edge.(package private) int
xgetBin
(double coord) This package private method is similar to coordToIndex except that it returns our internal definition for overflow/underflow(package private) int
xmap
(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
public double binCentre(int index) Description copied from interface:IAxis
Centre of the bin specified. -
binLowerEdge
public double binLowerEdge(int index) Description copied from interface:IAxis
Lower edge of the specified bin.- Specified by:
binLowerEdge
in 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
public int bins()Description copied from interface:IAxis
The number of bins (excluding underflow and overflow) on the axis. -
binUpperEdge
public double binUpperEdge(int index) Description copied from interface:IAxis
Upper edge of the specified bin.- Specified by:
binUpperEdge
in 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
public double binWidth(int index) Description copied from interface:IAxis
Width of the bin specified. -
coordToIndex
public int coordToIndex(double coord) Description copied from interface:IAxis
Converts 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:
coordToIndex
in interfaceIAxis
-
lowerEdge
public double lowerEdge()Description copied from interface:IAxis
Lower axis edge. -
upperEdge
public double upperEdge()Description copied from interface:IAxis
Upper axis edge. -
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
-