joshuak94 / BAMIntervalTree

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Can we speed up the median calculation? #15

Open joshuak94 opened 3 years ago

joshuak94 commented 3 years ago

Current median calculation:

Instead, we could do something like this:

joshuak94 commented 3 years ago

This probably isn't possible, because you can't know in advance which records will be removed from the list...

joshuak94 commented 3 years ago

Use merge instead of adding to a new list and then sorting...

joshuak94 commented 3 years ago

Another thing to consider is we might be fine to use the mean instead of the median, since we wouldn't really expect any "outlier" intervals...