Ok been racking my brain for an "intelligent" solution to my problem set. I think that I may have frie my brain and msising something obvious. So onward with the asking.
I have a set of time based data. Each piece of data ahs a start time and an end time. The incomming data can overlap, and is not aligned with each other in any way. What I need to do is take this data, and create new set of values, broken down into overlaping bits (adding the values for voerlap, althoguh eventually I may have to average them as well). For example if given:
start end value
0 100 100
25 50 200
50 75 300
I would get
0 25 100
25 50 300
50 75 600
75 100 400
In the simple case above its pretty easy to do by hand. But it gets more difficult as the size of data gets bigger and the overlaps weirder. All of the solutions I come up with are exponential which will not work as I may be dealing with 1million+ data points here. Any ideas on an algorithm?