|
sgsPy
structurally guided sampling
|
#include <helper.h>
Public Member Functions | |
| void | update (double x) |
| double | getMean () |
| double | getStdev () |
| int64_t | getCount () |
This struct contains the intermediate values, as well as functions for updating the intermediate values of the variance of a raster band using Welfords method. The mean and standard deviation of a raster band can be calculated afterwards without requiring the whole raster to be in memory.
Double precision is always used for higher precision of potentially small values.
https://jonisalonen.com/2013/deriving-welfords-method-for-computing-variance/
|
inline |
calculate the total number of pixels.
|
inline |
getter function for running mean value.
|
inline |
calculate the standard deviation using the running variance calculation.
|
inline |
update the variance calculation with a new value.
| double | x |