Add RoaringTreemap::contains_range and range_cardinality#351
Conversation
RoaringBitmap has had both methods; this closes the same gap on RoaringTreemap using BTreeMap::range to iterate only the relevant high-word buckets.
Kerollmops
left a comment
There was a problem hiding this comment.
Thank you very much for this PR. I see that Clippy may have been auto-updated and is triggering an error. Can you fix it quickly, please?
Overall, the PR looks good. I just have a small improvement proposal. Can you address it?
Kerollmops
left a comment
There was a problem hiding this comment.
The CI issue doesn't seems related to your code so I'll merge it. Thanks for the help!
01919af
|
Thanks for the review and merge. Yes, the Clippy warning was on existing code this PR didn’t touch, so I think a newer Clippy version likely started flagging it. FWIW I checked the |
RoaringBitmaphascontains_rangeandrange_cardinality;RoaringTreemapdoes not.Empty-range conventions match
RoaringBitmap:contains_rangereturnstrue,range_cardinalityreturns0.New test file
treemap_range_checks.rsmirrorsrange_checks.rs.