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
Let's say I have a RoaringBitmap with the values 0, 1, 32, 35 and 70. Now I want to reduce all values > 6 and < 40 by, say, 2. Is there a thing I'm overlooking or would I have to remove and recreate the values via from_sorted_iter?
The text was updated successfully, but these errors were encountered:
Happy to see you there. Unfortunately, there is no direct operation to do the following. What I would do is create a second bitmap with numbers in between 7 (> 6) and 39 (<40), do an intersection to get the real numbers. Do the increment by 2 by by iterating on this subset and creating a new bitmap (yes, again). Using the RoaringBitmap::remove_range method to delete the range of values in between 7 and 39 then do the union with the previously shifted bitmap (using the BitOrAssign operator).
What are we Missing to be Efficient?
A way to split a bitmap when doing an operation: fn extract_range(&self, impl Range) -> RoaringBitmap.
A way to do different, simple, operations on a bitmap in-place: fn increment_all(&mut self, n: usize) -> u64.
Or a way to directly do that on the bitmap itself: fn increment_range(&mut self, r: impl Range, n: usize) -> u64.
Yeah, I guess having RoaringBitmap::{in, de}crement_range functions would probably get the most bang for the buck, and could also easily be SIMD-optimized.
Let's say I have a RoaringBitmap with the values 0, 1, 32, 35 and 70. Now I want to reduce all values > 6 and < 40 by, say, 2. Is there a thing I'm overlooking or would I have to remove and recreate the values via
from_sorted_iter
?The text was updated successfully, but these errors were encountered: