## Class Statistics_f

• java.lang.Object
• org.robwork.sdurw_math.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
Modifier and Type Method Description
void add​(float t)
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.

public void add​(float t)
public void clear()
public SWIGTYPE_p_std__listT_float_t data()
public java.lang.String toString()
toString in class java.lang.Object