Closed root-11 closed 2 years ago
published here in any case: https://github.com/root-11/root-11.github.io/blob/master/content/comparing_ranges.ipynb
Thanks for sharing, but I don't especially see how this is useful for this module.
Range calculations are a lot easier when using continuous ranges as this module provides, as compared to discrete ranges like python's range
- all ranges.Range.intersection()
and ranges.RangeSet.intersection()
need to do is compare endpoints, whereas with discrete ranges you do actually need to find all individual overlapping elements.
Right. Sorry for not being explicit. My mistake. Let's say we have 10s or 100s of disconnected RangeSets that may or may not intersect with another collection of RangeSets. To answer the problem of whether these sets intersect you can use the code I wrote. Kind regards B
On Sat, 19 Mar 2022 at 02:04, Louis Jacobowitz @.***> wrote:
Thanks for sharing, but I don't especially see how this is useful for this module.
Range calculations are a lot easier when using continuous ranges as this module provides, as compared to discrete ranges like python's range - all ranges.Range.intersection() and ranges.RangeSet.intersection() need to do is compare endpoints, whereas with discrete ranges you do actually need to find all individual overlapping elements.
— Reply to this email directly, view it on GitHub https://github.com/Superbird11/ranges/issues/17#issuecomment-1072918495, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA64MJXBQO6WNFSDC6T64ULVAUY3HANCNFSM5QVO5KHA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>
-- Bjorn Madsen, Ph.D., MIET @.*** Ph.: (+44) 0 7792 030 720 Flat 7, 49B Spylaw Street, Colinton, Edinburgh, EH13 0JT
I took some inspiration from your repo and thought it would be kind to return the favour ;-)
My use case:
I have a lot data in paginated memory blocks. Each page is generally of a block size but can vary due to inserts and deletes. My challenge: Determine whether the contents of a page needs to be loaded to answer a users query for slice.
Simplistic example:
Here is the solution:
tests
Speak later ;-)