We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
You can look at the queries as histograms
so you've got a bunch of histograms and you want to combine them.
Basically you don't want overlapping queries.
A way to do this is to consider each index in the queries as a level transition. Doesn't matter if it's at the query start index or the end index.
You can just make tuples of...( transition_index, level_change)
A starting query index has positive level_change.
An ending query index has a neg. level_change. Just track the sum level as you go
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
You can look at the queries as histograms so you've got a bunch of histograms and you want to combine them. Basically you don't want overlapping queries.
A way to do this is to consider each index in the queries as a level transition. Doesn't matter if it's at the query start index or the end index. You can just make tuples of...( transition_index, level_change) A starting query index has positive level_change. An ending query index has a neg. level_change. Just track the sum level as you go