Documentation of 'hep.aida.ref.histogram.DataPointSet' Java class
DataPointSet
hep.aida.ref.histogram

Class DataPointSet

    • Constructor Detail

      • DataPointSet

        public DataPointSet(java.lang.String name,
                            java.lang.String title,
                            int dimOfPoints)
      • DataPointSet

        public DataPointSet(java.lang.String name,
                            java.lang.String title,
                            int dimOfPoints,
                            int defaultCapacity)
      • DataPointSet

        public DataPointSet(java.lang.String name,
                            java.lang.String title,
                            int dimOfPoints,
                            java.lang.String options)
      • DataPointSet

        public DataPointSet(java.lang.String name,
                            java.lang.String title,
                            int dimOfPoints,
                            int defaultCapacity,
                            java.lang.String options)
    • Method Detail

      • setAnnotation

        public void setAnnotation(IAnnotation annotation)
      • title

        public java.lang.String title()
        Description copied from interface: IDataPointSet
        Get the title of the IDataPointSet.
        Specified by:
        title in interface IDataPointSet
        Returns:
        The title.
      • setTitle

        public void setTitle(java.lang.String title)
                      throws java.lang.IllegalArgumentException
        Description copied from interface: IDataPointSet
        Set the title of the IDataPointSet.
        Specified by:
        setTitle in interface IDataPointSet
        Parameters:
        title - The new title.
        Throws:
        java.lang.IllegalArgumentException - If the title cannot be set.
      • dimension

        public int dimension()
        Description copied from interface: IDataPointSet
        Get the dimension of the IDataPoints that can be stored in the set.
        Specified by:
        dimension in interface IDataPointSet
        Returns:
        The dimension of the IDataPoints storable in the set.
      • clear

        public void clear()
        Description copied from interface: IDataPointSet
        Remove all the IDataPoints in the set. After this the IDataPointSet is as just created.
        Specified by:
        clear in interface IDataPointSet
      • size

        public int size()
        Description copied from interface: IDataPointSet
        Get the current size of the IDataPointSet, i.e. the number of IDataPoints contained in the set.
        Specified by:
        size in interface IDataPointSet
        Returns:
        The size of the IDataPointSet.
      • point

        public IDataPoint point(int index)
        Description copied from interface: IDataPointSet
        Get the IDataPoint at a give index in the set.
        Specified by:
        point in interface IDataPointSet
        Parameters:
        index - The IDataPoint index.
        Returns:
        The corresponding IDataPoint.
      • setPoint

        public void setPoint(int index,
                             IDataPoint point)
                      throws java.lang.IllegalArgumentException
        Set the IDataPoint at a give index in the set. This method is not in the IDataSet interface and is here for efficiency reasons
        Parameters:
        index - The IDataPoint index.
        point - The corresponding IDataPoint to be set at the index
        Throws:
        java.lang.IllegalArgumentException - If the index is < 0 or >= size().
      • addPoint

        public IDataPoint addPoint()
                            throws java.lang.RuntimeException
        Description copied from interface: IDataPointSet
        Add a new empty IDataPoint at the end of the set.
        Specified by:
        addPoint in interface IDataPointSet
        Returns:
        The newly added point.
        Throws:
        java.lang.RuntimeException - If a new IDataPoint cannot be added to the set.
      • addPoint

        public void addPoint(IDataPoint point)
                      throws java.lang.IllegalArgumentException
        Description copied from interface: IDataPointSet
        Add a copy of an IDataPoint at the end of the set.
        Specified by:
        addPoint in interface IDataPointSet
        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

        public void removePoint(int index)
                         throws java.lang.IllegalArgumentException
        Description copied from interface: IDataPointSet
        Remove the IDataPoint at a given index.
        Specified by:
        removePoint in interface IDataPointSet
        Parameters:
        index - The index of the IDataPoint to be removed.
        Throws:
        java.lang.IllegalArgumentException - If the index is < 0 or >= size().
      • lowerExtent

        public double lowerExtent(int coord)
                           throws java.lang.IllegalArgumentException
        Description copied from interface: IDataPointSet
        Get the lower value for a give axis.
        Specified by:
        lowerExtent in interface IDataPointSet
        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.IllegalArgumentException
        Description copied from interface: IDataPointSet
        Get the upper value for a give axis.
        Specified by:
        upperExtent in interface IDataPointSet
        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

        public void scale(double scaleFactor)
                   throws java.lang.IllegalArgumentException
        Description copied from interface: IDataPointSet
        Scales the values and the errors of all the measurements of each point by a given factor.
        Specified by:
        scale in interface IDataPointSet
        Parameters:
        scaleFactor - The scale factor.
        Throws:
        java.lang.IllegalArgumentException - If an illegal scaleFactor is provided.
      • scaleValues

        public void scaleValues(double scaleFactor)
                         throws java.lang.IllegalArgumentException
        Description copied from interface: IDataPointSet
        Scales the values of all the measurements of each point by a given factor.
        Specified by:
        scaleValues in interface IDataPointSet
        Parameters:
        scaleFactor - The scale factor.
        Throws:
        java.lang.IllegalArgumentException - If an illegal scaleFactor is provided.
      • scaleErrors

        public void scaleErrors(double scaleFactor)
                         throws java.lang.IllegalArgumentException
        Description copied from interface: IDataPointSet
        Scales the errors of all the measurements of each point by a given factor.
        Specified by:
        scaleErrors in interface IDataPointSet
        Parameters:
        scaleFactor - The scale factor.
        Throws:
        java.lang.IllegalArgumentException - If an illegal scaleFactor is provided.
      • setCoordinate

        public void setCoordinate(int coord,
                                  double[] values,
                                  double[] errors)
                           throws java.lang.IllegalArgumentException
        Description copied from interface: IDataPointSet
        Set 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.
        Specified by:
        setCoordinate in interface IDataPointSet
        Parameters:
        coord - The coordinate's index
        values - The array of the values for the given coordinate
        errors - 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

        public void setCoordinate(int coord,
                                  double[] values,
                                  double[] errp,
                                  double[] errm)
                           throws java.lang.IllegalArgumentException
        Description copied from interface: IDataPointSet
        Set 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.
        Specified by:
        setCoordinate in interface IDataPointSet
        Parameters:
        coord - The coordinate's index
        values - The array of the values for the given coordinate
        errp - 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.
      • stateChanged

        public void stateChanged(java.util.EventObject e)
        Specified by:
        stateChanged in interface AIDAListener

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.