Documentation of 'org.jlab.groot.data.DataVector' Java class
DataVector
org.jlab.groot.data

Class DataVector



  • public class DataVector
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(double value)
      Add value to the vector and ensure that the vector is ordered.
      void addDataVector(DataVector vec) 
      void clear() 
      void copy(DataVector vec) 
      void divide(double norm)
      Divides the content of the vector by given number.
      int findBin(double value) 
      int findBin(double value, int start) 
      double[] getArray() 
      int getBinSuggestion() 
      double getBinWidth(int index) 
      DataVector getCumulative()
      Returns cumulative integral of the vector.
      double getHighEdge(int bin) 
      double getLowEdge(int bin)
      Returns the low edge for the bin which is determined by bin width.
      double getMax()
      calculate maximum value in the data
      double getMean()
      Calculates the mean of the vector.
      double getMean(DataVector xvec)
      Calculates the normalized mean with the given axis.
      double getMin()
      calculate the minimum value in the data.
      double getRMS() 
      int getSize()
      Returns the number of entries in the vector
      double getValue(int index) 
      boolean isOrdered() 
      void mult(double norm)
      Multiplies the whole data with the provided number
      void set(double[] data)
      Initialize the array with given values.
      void set(int index, double value) 
      void set(java.util.List<java.lang.Double> data) 
      void setValue(int index, double value) 
      int size() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataVector

        public DataVector(int size)
      • DataVector

        public DataVector()
      • DataVector

        public DataVector(double[] data)
      • DataVector

        public DataVector(java.util.List<java.lang.Double> data)
    • Method Detail

      • set

        public final void set(double[] data)
        Initialize the array with given values.
        Parameters:
        data - initial data
      • set

        public final void set(java.util.List<java.lang.Double> data)
      • size

        public int size()
      • clear

        public void clear()
      • addDataVector

        public void addDataVector(DataVector vec)
      • add

        public void add(double value)
        Add value to the vector and ensure that the vector is ordered. If the value does not appear to be in ordered mode, then set the flag ordered to FALSE.
        Parameters:
        value - next value to the data vector.
      • getMin

        public double getMin()
        calculate the minimum value in the data.
        Returns:
        minimum of all data points
      • getMax

        public double getMax()
        calculate maximum value in the data
        Returns:
        maximum value of the data.
      • getBinSuggestion

        public int getBinSuggestion()
      • isOrdered

        public boolean isOrdered()
      • findBin

        public int findBin(double value)
      • findBin

        public int findBin(double value,
                           int start)
      • mult

        public void mult(double norm)
        Multiplies the whole data with the provided number
        Parameters:
        norm - multiplication factor
      • divide

        public void divide(double norm)
        Divides the content of the vector by given number.
        Parameters:
        norm -
      • getCumulative

        public DataVector getCumulative()
        Returns cumulative integral of the vector.
        Returns:
      • getMean

        public double getMean(DataVector xvec)
        Calculates the normalized mean with the given axis.
        Parameters:
        xvec -
        Returns:
      • getMean

        public double getMean()
        Calculates the mean of the vector.
        Returns:
        mean value
      • getRMS

        public double getRMS()
      • getSize

        public int getSize()
        Returns the number of entries in the vector
        Returns:
        size
      • getValue

        public double getValue(int index)
      • getLowEdge

        public double getLowEdge(int bin)
        Returns the low edge for the bin which is determined by bin width.
        Parameters:
        bin - bin number
        Returns:
        the low edge for the bin.
      • getHighEdge

        public double getHighEdge(int bin)
      • getBinWidth

        public double getBinWidth(int index)
      • getArray

        public double[] getArray()
      • set

        public void set(int index,
                        double value)
      • setValue

        public void setValue(int index,
                             double value)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.