The Distribution class allows to collect a set of values and then compute some statistics like average, variance, standardDeviation, and percentiles.
More...
#include <vclib/math/distribution.h>
|
| Distribution ()=default |
| Creates an empty distribution.
|
|
void | clear () |
| Clears the distribution, removing all its values.
|
|
void | add (Scalar v) |
| Adds a value to the distribution.
|
|
Scalar | min () const |
| Returns the minimum value of the distribution.
|
|
Scalar | max () const |
| Returns the maximum value of the distribution.
|
|
uint | size () const |
| Returns the number of values of the distribution.
|
|
Scalar | sum () const |
| Returns the sum of the values of the distribution.
|
|
Scalar | average () const |
| Returns the average of the values of the distribution.
|
|
Scalar | rootMeanSquare () const |
| Returns the root mean square of the values of the distribution.
|
|
Scalar | variance () const |
| Returns the variance of the values of the distribution.
|
|
Scalar | standardDeviation () const |
| Returns the standard deviation of the values of the distribution.
|
|
Scalar | percentile (Scalar perc) const |
| Returns the perc percentile of the values of the distribution.
|
|
|
std::set< Scalar > | mSet |
|
Scalar | mMin = std::numeric_limits<Scalar>::max() |
|
Scalar | mMax = std::numeric_limits<Scalar>::lowest() |
|
Scalar | mSum = 0 |
|
Scalar | mSqrdSum = 0 |
|
Scalar | mAvg = 0 |
|
Scalar | mSqrdAvg = 0 |
|
Scalar | mRMS = 0 |
|
template<
typename Scalar>
class vcl::Distribution< Scalar >
The Distribution class allows to collect a set of values and then compute some statistics like average, variance, standardDeviation, and percentiles.
◆ add()
Adds a value to the distribution.
- Parameters
-
◆ average()
Returns the average of the values of the distribution.
- Returns
- The average of the distribution values.
◆ max()
Returns the maximum value of the distribution.
If the distribution is empty, returns std::numeric_limits::lowest().
- Returns
- The maximum of the distribution values.
◆ min()
Returns the minimum value of the distribution.
If the distribution is empty, returns std::numeric_limits::max().
- Returns
- The minimum of the distribution values.
◆ percentile()
Returns the perc
percentile of the values of the distribution.
- Parameters
-
[in] | perc | the desired percentile. Must be a value between 0 and 1. |
- Returns
- The value of the distribution in the given percentile.
◆ rootMeanSquare()
Returns the root mean square of the values of the distribution.
- Returns
- The root mean square of the distribution values.
◆ size()
Returns the number of values of the distribution.
- Returns
- The size of the distribution.
◆ standardDeviation()
Returns the standard deviation of the values of the distribution.
- Returns
- The standard deviation of the distribution values.
◆ sum()
Returns the sum of the values of the distribution.
- Returns
- The sum of the distribution values.
◆ variance()
Returns the variance of the values of the distribution.
- Returns
- The variance of the distribution values.
The documentation for this class was generated from the following file: