hep.aida
Interface IDataPointSet
-
- All Known Implementing Classes:
- DataPointSet
public interface IDataPointSetBasic user-level interface class for holding and managing a single set of "data points".
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description IDataPointaddPoint()Add a new empty IDataPoint at the end of the set.voidaddPoint(IDataPoint point)Add a copy of an IDataPoint at the end of the set.IAnnotationannotation()Get the IAnnotation of the IDataPointSet.voidclear()Remove all the IDataPoints in the set.intdimension()Get the dimension of the IDataPoints that can be stored in the set.doublelowerExtent(int coord)Get the lower value for a give axis.IDataPointpoint(int index)Get the IDataPoint at a give index in the set.voidremovePoint(int index)Remove the IDataPoint at a given index.voidscale(double scaleFactor)Scales the values and the errors of all the measurements of each point by a given factor.voidscaleErrors(double scaleFactor)Scales the errors of all the measurements of each point by a given factor.voidscaleValues(double scaleFactor)Scales the values of all the measurements of each point by a given factor.voidsetCoordinate(int coord, double[] val, double[] err)Set the values and errors of a given coordinate all at once.voidsetCoordinate(int coord, double[] val, double[] errp, double[] errm)Set the values and errors of a given coordinate all at once.voidsetTitle(java.lang.String title)Set the title of the IDataPointSet.intsize()Get the current size of the IDataPointSet, i.e.java.lang.Stringtitle()Get the title of the IDataPointSet.doubleupperExtent(int coord)Get the upper value for a give axis.
-
-
-
Method Detail
-
annotation
IAnnotation annotation()
Get the IAnnotation of the IDataPointSet.- Returns:
- The IAnnotation.
-
title
java.lang.String title()
Get the title of the IDataPointSet.- Returns:
- The title.
-
setTitle
void setTitle(java.lang.String title) throws java.lang.IllegalArgumentExceptionSet the title of the IDataPointSet.- Parameters:
title- The new title.- Throws:
java.lang.IllegalArgumentException- If the title cannot be set.
-
dimension
int dimension()
Get the dimension of the IDataPoints that can be stored in the set.- Returns:
- The dimension of the IDataPoints storable in the set.
-
clear
void clear()
Remove all the IDataPoints in the set. After this the IDataPointSet is as just created.
-
size
int size()
Get the current size of the IDataPointSet, i.e. the number of IDataPoints contained in the set.- Returns:
- The size of the IDataPointSet.
-
point
IDataPoint point(int index)
Get the IDataPoint at a give index in the set.- Parameters:
index- The IDataPoint index.- Returns:
- The corresponding IDataPoint.
-
setCoordinate
void setCoordinate(int coord, double[] val, double[] err) throws java.lang.IllegalArgumentExceptionSet the values and errors of a given coordinate all at once. If this method is called on an empty IDataPointSet, a number of points equal to the size of the arrays provided is created; if the IDataPointSet is not empty the dimension of the array must match with the size of the IDataPointSet.- Parameters:
coord- The coordinate's indexval- The array of the values for the given coordinateerr- The array with the symmetric errors.- Throws:
java.lang.IllegalArgumentException- if an illegal coordinate is provided or if there is a mismatch between the size of the array and the size of the IDataPointSet.
-
setCoordinate
void setCoordinate(int coord, double[] val, double[] errp, double[] errm) throws java.lang.IllegalArgumentExceptionSet the values and errors of a given coordinate all at once. If this method is called on an empty IDataPointSet, a number of points equal to the size of the arrays provided is created; if the IDataPointSet is not empty the dimension of the array must match with the size of the IDataPointSet.- Parameters:
coord- The coordinate's indexval- The array of the values for the given coordinateerrp- The array with the plus errors.errm- The array with the minus errors.- Throws:
java.lang.IllegalArgumentException- if an illegal coordinate is provided or if there is a mismatch between the size of the array and the size of the IDataPointSet.
-
addPoint
IDataPoint addPoint() throws java.lang.RuntimeException
Add a new empty IDataPoint at the end of the set.- Returns:
- The newly added point.
- Throws:
java.lang.RuntimeException- If a new IDataPoint cannot be added to the set.
-
addPoint
void addPoint(IDataPoint point) throws java.lang.IllegalArgumentException
Add a copy of an IDataPoint at the end of the set.- Parameters:
point- The IDataPoint to be added.- Throws:
java.lang.IllegalArgumentException- If the point has the wrong dimension or if the point cannot be added.
-
removePoint
void removePoint(int index) throws java.lang.IllegalArgumentExceptionRemove the IDataPoint at a given index.- Parameters:
index- The index of the IDataPoint to be removed.- Throws:
java.lang.IllegalArgumentException- If the index is < 0 or >= size().
-
lowerExtent
double lowerExtent(int coord) throws java.lang.IllegalArgumentExceptionGet the lower value for a give axis.- 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
double upperExtent(int coord) throws java.lang.IllegalArgumentExceptionGet the upper value for a give axis.- 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.
-
scale
void scale(double scaleFactor) throws java.lang.IllegalArgumentExceptionScales the values and the errors of all the measurements of each point by a given factor.- Parameters:
scaleFactor- The scale factor.- Throws:
java.lang.IllegalArgumentException- If an illegal scaleFactor is provided.
-
scaleValues
void scaleValues(double scaleFactor) throws java.lang.IllegalArgumentExceptionScales the values of all the measurements of each point by a given factor.- Parameters:
scaleFactor- The scale factor.- Throws:
java.lang.IllegalArgumentException- If an illegal scaleFactor is provided.
-
scaleErrors
void scaleErrors(double scaleFactor) throws java.lang.IllegalArgumentExceptionScales the errors of all the measurements of each point by a given factor.- Parameters:
scaleFactor- The scale factor.- Throws:
java.lang.IllegalArgumentException- If an illegal scaleFactor is provided.
-
-
DMelt 3.0 © DataMelt by jWork.ORG