calculate

Calculates the moving-window median for the next value of the input stream.

Return

The median of the moving window, updated to include the next value.

Parameters

next

The next input value.