Package org.robwork.sdurw_math
Class Statistics_f
- java.lang.Object
-
- org.robwork.sdurw_math.Statistics_f
-
public class Statistics_f extends java.lang.ObjectClass 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 voidadd(float t)Add data to statisticsfloatangularMean()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_fangularMeanAndVariance()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.floatangularVariance()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.voidclear()Clear the recorded statistics dataSWIGTYPE_p_std__listT_float_tdata()Provides reference to the internal data containervoiddelete()static longgetCPtr(Statistics_f obj)floatmaxValue()Returns the maximum value of data added.
If no data is added 0 is returned.floatmean()Returns the mean of the values added
The mean is computed as \frac{1}{n} \Sigma_{d\in data}dpair_f_fmeanAndVariance()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.floatmedian()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_fminAndMaxValue()Returns pair containing the minimum and maximum value of the data added.
If no data is added 0 is returned for both values.floatminValue()Returns the minimum value of data added.
If no data is added 0 is returned.java.lang.StringtoString()floatvariance()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.
-
-
-
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
-
data
public SWIGTYPE_p_std__listT_float_t data()
Provides reference to the internal data container
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-