This function allocates a workspace for computing running statistics. The size of the workspace is O(1).
This function frees the memory associated with the workspace w.
This function resets the workspace w to its initial state, so it can begin working on a new set of data.