LibreOffice Module sc (master) 1
|
Implements the Welford Online one-pass algorithm. More...
#include <subtotal.hxx>
Public Member Functions | |
WelfordRunner () | |
void | update (double fVal) |
sal_uInt64 | getCount () const |
double | getVarianceSample () const |
double | getVariancePopulation () const |
Private Attributes | |
double | mfMean |
double | mfM2 |
sal_uInt64 | mnCount |
Friends | |
class | ScFunctionData |
Implements the Welford Online one-pass algorithm.
See https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_Online_algorithm and Donald E. Knuth, TAoCP vol.2, 3rd edn., p. 232
Definition at line 38 of file subtotal.hxx.
|
inline |
Definition at line 41 of file subtotal.hxx.
|
inline |
Definition at line 43 of file subtotal.hxx.
References mnCount.
Referenced by ScDPAggData::Calculate(), and ScFunctionData::getResult().
|
inline |
Definition at line 45 of file subtotal.hxx.
Referenced by ScDPAggData::Calculate(), and ScFunctionData::getResult().
|
inline |
Definition at line 44 of file subtotal.hxx.
Referenced by ScDPAggData::Calculate(), and ScFunctionData::getResult().
void WelfordRunner::update | ( | double | fVal | ) |
Definition at line 196 of file subtotal.cxx.
References mfM2, mfMean, and mnCount.
Referenced by ScDPAggData::Update(), and ScFunctionData::update().
|
friend |
Definition at line 52 of file subtotal.hxx.
|
private |
Definition at line 55 of file subtotal.hxx.
Referenced by getVariancePopulation(), getVarianceSample(), and update().
|
private |
Definition at line 54 of file subtotal.hxx.
Referenced by ScFunctionData::getValueRef(), and update().
|
private |
Definition at line 56 of file subtotal.hxx.
Referenced by getCount(), ScFunctionData::getCountRef(), getVariancePopulation(), getVarianceSample(), and update().