SPH
|
Generalized mean with positive (runtime) power. More...
#include <Means.h>
Public Member Functions | |
PositiveMean (const Float power) | |
INLINE void | accumulate (const Float value) |
INLINE void | accumulate (const PositiveMean &other) |
INLINE void | reset () |
INLINE Float | compute () const |
INLINE Size | count () const |
Protected Attributes | |
double | sum = 0. |
Size | weight = 0 |
Float | power |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const PositiveMean &stats) |
Generalized mean with positive (runtime) power.
Cannot be used to compute geometric mean. If constructed with non-positive power, it issues an assert.
|
inline |
|
friend |