DataKeeper
jhpro.stat

Class DataKeeper



  • public class DataKeeperextends Object
    A convenient class to keep data with error for an internal representation. Can be filled from histograms or P1D.
    • Constructor Detail

      • DataKeeper

        public DataKeeper(int size)
      • DataKeeper

        public DataKeeper(P1D p1d)
        Initialize from a P1D
        Parameters:
        p1d - input P1D
      • DataKeeper

        public DataKeeper(H1D h1d)
        Initialize from a histogram
        Parameters:
        h1d -
    • Method Detail

      • setTitle

        public void setTitle(String title)
      • getTitle

        public String getTitle()
      • setErrors

        public void setErrors(double[] errors)
      • setValues

        public void setValues(double[] values)
      • scale

        public void scale(int index,         double factor)
        Scale values and errors by a factor
        Parameters:
        index - index of the value
        factor - factor to scale
      • scale

        public void scale(double factor)
        Scale all values and errors by a factor
        Parameters:
        factor - factor to scale
      • getErrors

        public double[] getErrors()
      • getValues

        public double[] getValues()
        Get values
        Returns:
      • getIntegral

        public double getIntegral()
        Calculate integral, summing up all values
        Returns:
        H1D integral
      • getError

        public double getError(int index)
        Get error at index
        Parameters:
        index -
      • getValue

        public double getValue(int index)
        Get value at index
        Parameters:
        index -
      • setValue

        public void setValue(int index,            double value)
        Set a value at index
        Parameters:
        index - index
        value - value
      • setError

        public void setError(int index,            double value)
        Set a error at index
        Parameters:
        index - index
        value - value
      • getSize

        public int getSize()
        Get the size of container
        Returns:

SCaVis 1.8 © jWork.org