Module Algostream_analytics.Rolling

Fixed-window rolling statistics with periodic full recompute.

The naive sliding-Welford trick (subtract the outgoing point's contribution from M2) suffers catastrophic cancellation on long-running streams. Each module here keeps the most recent window samples in a circular buffer and runs an O(window) full recompute every recompute_every ticks. Between recomputes, an incremental update is applied for cheap reads, but the contract is: the value returned at recompute boundaries is exact; intermediate values are bounded-error approximations.

module Rolling_mean : sig ... end
module Rolling_var : sig ... end
module Rolling_cov : sig ... end
module Rolling_corr : sig ... end