-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImmutableRangeMap does not support connected ranges as keys #37
Comments
Upon ImmutableRangeMap build, can we tranform half-open or all-open intervals into closed intervals, and keep using RangeSet? Or do we need to replace RangeSet with something new? |
@qpwo : Can you elaborate on what you mean by " transform half-open or all-open intervals into closed intervals", perhaps using the example in the issue description? |
Yes, {[0, 1], (1, 2]} would become {[0, 1], [2,2]}. Or {[3,5], (5, 9), [10, 15)} would become {[3,5], [6,8], [10,14]}. (Since we're only dealing with integers right?) I think the appropriate place to do the change would be at |
@qpwo : That would be a fine solution if we were only dealing with integers, but A really hack-y implementation would be to deal with any connections between a half-closed and a closed interval by making the closed interval also half-closed and storing a separate map for the "connection points". So in the I think the solution here is probably to not rely on |
|
Yes |
However, if it were easy to make |
Can someone comment on why this was closed? |
For example,
[0, 1]
and(1, 2]
cannot both be keys. This is because we currently use aRangeSet
in our implementation, which will coalesce these keys on construction.For our NLP work this is rarely a problem because we don't use open intervals.
The text was updated successfully, but these errors were encountered: