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 (const ValueT &val) | |
Stats & | add (const ValueT &val) |
Add a single sample. More... | |
Stats & | add (const ValueT &val, uint64_t n) |
Add n samples with constant value val. More... | |
Stats & | add (const Stats &other) |
Add the samples from the other Stats instance. More... | |
size_t | size () const |
double | avg () const |
Return the arithmetic mean, i.e. average, value. More... | |
double | mean () const |
double | var () const |
Return the population variance. More... | |
double | variance () const |
double | std () const |
Return the standard deviation (=Sqrt(variance)) as defined from the (biased) population variance. More... | |
double | stdDev () const |
Extrema & | min (const ValueT &v) |
const ValueT & | min () const |
Extrema & | max (const ValueT &v) |
const ValueT & | max () const |
Extrema & | add (const Extrema &other) |
operator bool () const | |
Static Public Member Functions | |
static constexpr bool | hasMinMax () |
static constexpr bool | hasAverage () |
static constexpr bool | hasStdDeviation () |
static constexpr size_t | size () |
Protected Types | |
using | BaseT = Extrema< ValueT, 0 > |
using | RealT = double |
Protected Attributes | |
size_t | mSize |
double | mAvg |
double | mAux |
ValueT | mMin |
ValueT | mMax |
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)
|
protected |
using ValueType = ValueT |
|
inline |
|
inline |
Add the samples from the other Stats instance.
|
inline |
Add a single sample.
|
inline |
Add n samples with constant value val.
|
inline |
Return the arithmetic mean, i.e. average, value.
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlineinherited |
|
inlineinherited |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinestaticconstexprinherited |
|
inline |
|
inline |
Return the standard deviation (=Sqrt(variance)) as defined from the (biased) population variance.
|
inline |
|
inline |
Return the population variance.
|
inline |
|
protected |
|
protected |
|
protectedinherited |
|
protectedinherited |
|
protected |