Welford internals v1. Adapted C code to CPP classes.