This is a lovely little utility for streaming data. I have a somewhat related use case:
- my 'window' is time based,
- observations come as pairs with
<t_i, x_i>
- your class helps for
min(x_i) and max(x_i) for all i
- when adding I also check if the time span between newest and oldest exceeds 'window lengths'
- if so, pop old values
Is there are clever way to use your data structure to update?