This will allow correct results even if the number of data points is small. The way of doing it is implemented a BufferedStorelssQuantile with:
Quantile and buffer size initialization.
Should store the data points on an buffer until the limit is reached and keep an instance of the quantile to be used.
Initialization and clean should set the calculation to the exact implementation.
Implement a fallback into the approximate calculation if the buffer is full. It should add all previous values and clean the buffer. The buffer should not be used anymore because the approximation is already ongoing.
This will allow correct results even if the number of data points is small. The way of doing it is implemented a
BufferedStorelssQuantile
with: