hep.aida.ref.histogram
Class DataPoint
- java.lang.Object
-
- hep.aida.ref.event.AIDAObservable
-
- hep.aida.ref.histogram.DataPoint
-
- All Implemented Interfaces:
- IDataPoint, AIDAListener, IsObservable, java.io.Serializable
public class DataPoint extends AIDAObservable implements IDataPoint, IsObservable, java.io.Serializable, AIDAListener
Basic user-level interface class for holding and managing a single set of "measurements".- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DataPoint(double[] val)DataPoint(double[] val, double[] err)DataPoint(double[] val, double[] errMinus, double[] errPlus)DataPoint(IDataPoint p)DataPoint(IMeasurement[] meas)DataPoint(int dim)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclear()IMeasurementcoordinate(int coord)Get the IMeasurement for a given coordinate.intdimension()Get the dimension of the IDataPoint, i.e.doublelowerExtent(int coord)Get the lower value for a give axis.voidstateChanged(java.util.EventObject e)doubleupperExtent(int coord)Get the upper value for a give axis.-
Methods inherited from class hep.aida.ref.event.AIDAObservable
addListener, isConnected, removeAllListeners, removeListener, setConnected, setValid, setValidForAll
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hep.aida.ref.event.IsObservable
addListener, removeAllListeners, removeListener, setValid
-
-
-
-
Constructor Detail
-
DataPoint
public DataPoint(int dim)
-
DataPoint
public DataPoint(IDataPoint p)
-
DataPoint
public DataPoint(IMeasurement[] meas)
-
DataPoint
public DataPoint(double[] val)
-
DataPoint
public DataPoint(double[] val, double[] err)
-
DataPoint
public DataPoint(double[] val, double[] errMinus, double[] errPlus)
-
-
Method Detail
-
dimension
public int dimension()
Description copied from interface:IDataPointGet the dimension of the IDataPoint, i.e. the number of coordinates the point has.- Specified by:
dimensionin interfaceIDataPoint- Returns:
- The dimension.
-
coordinate
public IMeasurement coordinate(int coord)
Description copied from interface:IDataPointGet the IMeasurement for a given coordinate.- Specified by:
coordinatein interfaceIDataPoint- Parameters:
coord- The coordinate.- Returns:
- The corresponding IMeasurement.
-
lowerExtent
public double lowerExtent(int coord) throws java.lang.IllegalArgumentExceptionGet the lower value for a give axis. This method is not in the IDataPoint interface and is here for efficiency reasons- Parameters:
coord- The coordinate of the axis.- Returns:
- The lower edge of the corresponding axis.
- Throws:
java.lang.IllegalArgumentException- if coord < 0 or coord >= dimension() or if the set is empty.
-
upperExtent
public double upperExtent(int coord) throws java.lang.IllegalArgumentExceptionGet the upper value for a give axis. This method is not in the IDataPoint interface and is here for efficiency reasons- Parameters:
coord- The coordinate of the axis.- Returns:
- The upper edge of the corresponding axis.
- Throws:
java.lang.IllegalArgumentException- if coord < 0 or coord >= dimension() or if the set is empty.
-
stateChanged
public void stateChanged(java.util.EventObject e)
- Specified by:
stateChangedin interfaceAIDAListener
-
clear
public void clear()
-
-
DMelt 3.0 © DataMelt by jWork.ORG