OpenVDB 10.0.1
|
This class computes statistics (minimum value, maximum value, mean, variance and standard deviation) of a population of floating-point values. More...
#include <nanovdb/util/GridStats.h>
Public Types | |
using | ValueType = ValueT |
Public Member Functions | |
Stats () | |
Stats & | add (const ValueT &val) |
Add a single sample. | |
Stats & | add (const ValueT &val, uint64_t n) |
Add n samples with constant value val. | |
Stats & | add (const Stats &other) |
Add the samples from the other Stats instance. | |
size_t | size () const |
double | avg () const |
Return the arithmetic mean, i.e. average, value. | |
double | mean () const |
double | var () const |
Return the population variance. | |
double | variance () const |
double | std () const |
Return the standard deviation (=Sqrt(variance)) as defined from the (biased) population variance. | |
double | stdDev () const |
Static Public Member Functions | |
static constexpr bool | hasMinMax () |
static constexpr bool | hasAverage () |
static constexpr bool | hasStdDeviation () |
Protected Types | |
using | BaseT = Extrema< ValueT, 1 > |
using | RealT = double |
Protected Attributes | |
size_t | mSize |
double | mAvg |
double | mAux |
This class computes statistics (minimum value, maximum value, mean, variance and standard deviation) of a population of floating-point values.
variance = Mean[ (X-Mean[X])^2 ] = Mean[X^2] - Mean[X]^2, standard deviation = sqrt(variance)
Add the samples from the other Stats instance.
Add n samples with constant value val.
Return the arithmetic mean, i.e. average, value.
Return the standard deviation (=Sqrt(variance)) as defined from the (biased) population variance.
Return the population variance.