You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't expect this comment to move things forward (quite the opposite probably?), but I'll leave it here as a memo anyway.
Although it's rather clear that [[0..1)=1, [1..2)=0, [2..3)=1].mergeCoalescing([1..2), 1, (a, b) -> a + b)
should return [0, 3) = 1
it's not clear at all whether [[0..1)=1, [1..2)=0, [2..3)=0, [3..4)=0, [4..5)=1].mergeCoalescing([1..4), 1, (a, b) -> a + b)
should return [[0..2)=1, [2..3)=1, [3..5)=1]
or [[0..5)=1].
You've probably discovered this and much more similar flaws long time ago.
Surprisingly, I believe this seems to be an argument in favor of RangeMaps.coalesced
(#2665 (comment)).
Please consider addition of
RangeMap.mergeCoalescing
analogous toRangeMap.putCoalescing
. It would be a great complement ofRangeMap.merge
.I wish that you had choosen one-off coalesce operation rather than mutating one (see #2665), as it would be helpful in this use case as well.
The text was updated successfully, but these errors were encountered: