Class Statistics_f


  • public class Statistics_f
    extends java.lang.Object
    Class for collecting data and calculating simple statistics.
    • Constructor Summary

      Constructors 
      Constructor Description
      Statistics_f()  
      Statistics_f​(long cPtr, boolean cMemoryOwn)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(float t)
      Add data to statistics
      float angularMean()
      Returns the angular mean of the values added

      The angular mean is computed as \tan^{-1}\frac{\Sigma_{d\in data}\sin(d)}{\Sigma_{d\in data}\cos(d)}
      pair_f_f angularMeanAndVariance()
      returns the angular mean and the variance of the data.

      See documentation of Statistics::angularMean() and Statistics::angularVariance()
      for how the mean and variane are computed.
      float angularVariance()
      Returns the angular variance of the values added
      The variance is computed as \frac{1}{n-1} \Sigma_{d\in data}\left[\cos^{-1}(\sin(d)\sin(\mu)-\cos(d)\cos(\mu))\right]^2 where \mu is
      the angular mean of the data.
      void clear()
      Clear the recorded statistics data
      SWIGTYPE_p_std__listT_float_t data()
      Provides reference to the internal data container
      void delete()  
      static long getCPtr​(Statistics_f obj)  
      float maxValue()
      Returns the maximum value of data added.

      If no data is added 0 is returned.
      float mean()
      Returns the mean of the values added

      The mean is computed as \frac{1}{n} \Sigma_{d\in data}d
      pair_f_f meanAndVariance()
      returns the mean and the variance of the data.

      See documentation of Statistics::mean() and Statistics::variance()
      for how the mean and variane are computed.
      float median()
      Returns the median of the values added

      Given an equal number of element, the mean is calculated as the average of the two center
      elements.
      pair_f_f minAndMaxValue()
      Returns pair containing the minimum and maximum value of the data added.

      If no data is added 0 is returned for both values.
      float minValue()
      Returns the minimum value of data added.

      If no data is added 0 is returned.
      java.lang.String toString()  
      float variance()
      Returns the variance of the values added
      The variance is computed as \frac{1}{n-1} \Sigma_{d\in data}(m-\mu)^2
      where \mu is the mean of the data.
      • Methods inherited from class java.lang.Object

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

      • Statistics_f

        public Statistics_f​(long cPtr,
                            boolean cMemoryOwn)
      • Statistics_f

        public Statistics_f()
    • Method Detail

      • getCPtr

        public static long getCPtr​(Statistics_f obj)
      • delete

        public void delete()
      • mean

        public float mean()
        Returns the mean of the values added

        The mean is computed as \frac{1}{n} \Sigma_{d\in data}d
      • angularMean

        public float angularMean()
        Returns the angular mean of the values added

        The angular mean is computed as \tan^{-1}\frac{\Sigma_{d\in data}\sin(d)}{\Sigma_{d\in data}\cos(d)}
      • median

        public float median()
        Returns the median of the values added

        Given an equal number of element, the mean is calculated as the average of the two center
        elements.
      • variance

        public float variance()
        Returns the variance of the values added
        The variance is computed as \frac{1}{n-1} \Sigma_{d\in data}(m-\mu)^2
        where \mu is the mean of the data.
      • angularVariance

        public float angularVariance()
        Returns the angular variance of the values added
        The variance is computed as \frac{1}{n-1} \Sigma_{d\in data}\left[\cos^{-1}(\sin(d)\sin(\mu)-\cos(d)\cos(\mu))\right]^2 where \mu is
        the angular mean of the data.
      • meanAndVariance

        public pair_f_f meanAndVariance()
        returns the mean and the variance of the data.

        See documentation of Statistics::mean() and Statistics::variance()
        for how the mean and variane are computed.
      • angularMeanAndVariance

        public pair_f_f angularMeanAndVariance()
        returns the angular mean and the variance of the data.

        See documentation of Statistics::angularMean() and Statistics::angularVariance()
        for how the mean and variane are computed.
      • minValue

        public float minValue()
        Returns the minimum value of data added.

        If no data is added 0 is returned.
      • maxValue

        public float maxValue()
        Returns the maximum value of data added.

        If no data is added 0 is returned.
      • minAndMaxValue

        public pair_f_f minAndMaxValue()
        Returns pair containing the minimum and maximum value of the data added.

        If no data is added 0 is returned for both values.
      • add

        public void add​(float t)
        Add data to statistics
      • clear

        public void clear()
        Clear the recorded statistics data
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object