I'd like to calculate the median of a stream of lists.
by that I mean:
I have a continuous flow of lists (of say length 5) coming in.
Now I'd like to calculate the median for each position (compared to the previous lists at the same position).
So I don't want to calculate the median for one single list but basically as many medians as my lists are long.
a median window size of 3 and a list length of 3:
List 1: 1 2 1
List 2: 1 2 2
List 3: 0 2 3
Result: 1 2 2
I hope I made this clear.
This actually seems like a very basic thing but I just can't find an external or abstraction for this.
Does anybody know of one?
All the best