|
OpenVDB 11.0.0
|
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 | |
| __hostdev__ | Stats () |
| __hostdev__ Stats & | add (const ValueT &val) |
| Add a single sample. | |
| __hostdev__ Stats & | add (const ValueT &val, uint64_t n) |
| Add n samples with constant value val. | |
| __hostdev__ Stats & | add (const Stats &other) |
| Add the samples from the other Stats instance. | |
| __hostdev__ size_t | size () const |
| __hostdev__ double | avg () const |
| Return the arithmetic mean, i.e. average, value. | |
| __hostdev__ double | mean () const |
| __hostdev__ double | var () const |
| Return the population variance. | |
| __hostdev__ double | variance () const |
| __hostdev__ double | std () const |
| Return the standard deviation (=Sqrt(variance)) as defined from the (biased) population variance. | |
| __hostdev__ double | stdDev () const |
| template<typename NodeT > | |
| __hostdev__ void | setStats (NodeT &node) const |
Static Public Member Functions | |
| static __hostdev__ constexpr bool | hasMinMax () |
| static __hostdev__ constexpr bool | hasAverage () |
| static __hostdev__ constexpr bool | hasStdDeviation () |
| static __hostdev__ constexpr bool | hasStats () |
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)
|
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 |
|
inlinestaticconstexpr |
|
inline |
|
inline |
|
inline |
|
inline |
Return the standard deviation (=Sqrt(variance)) as defined from the (biased) population variance.
|
inline |
|
inline |
Return the population variance.
|
inline |
|
protected |
|
protected |
|
protected |