-
Notifications
You must be signed in to change notification settings - Fork 84
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
Iterate from minimum value #286
Comments
Hey @grelner 👋 I am wondering if it would be better to implement a new method directly on the RoaringBitmap iterator instead of having another iterator constructor. The method signature would be I am wondering if we want to introduce four methods on the four iterators (bitmap and treemap with the ref and owned ones) or if we want to declare a new trait 🤔 What do you think? |
Hi @Kerollmops As for the trait, why not? It may be useful for someone at some point |
@grelner, do you plan to implement it and propose a PR? I will be happy to review one and you should probably start without the trait, we can introduce it later in the same PR. |
@Kerollmops yes, working on it right now 😅 |
In the CRoaring bindings, I used the name |
I've run into a rust quirk I haven't encountered before in my implementation. I want to preserve the |
Hey @grelner 👋 You should take inspiration from the |
Think it's worth looking at what the lowest level abstraction would be. I'd argue (similar to advance_by unstablely in std) that the more fundamental operation is advancing an iterator in place until right before the desired location. |
Hey @grelner 👋 After thinking a little bit more about this issue I am wondering if implementing a non-lazy Like you just remove the What do you think? |
Hi @Kerollmops , that is essentially what I have implemented in #287 . There are a couple of things I'm not happy with in that PR tho, but I'll clean it up hopefully at some point in the next days, and mark it ready for review |
I have a use case where I need to iterate all values greater than a specific number. The bitmaps I'm working with are huge, so using
.iter().skipWhile
is too slow. I've had a look at thecontains
method is implemented, and a sound approach to achieve what I need would probably be to do a binary search to find the starting container, and iterate from there, introducing a new methodRoaringBitmap.iter_from(&self, min_value: u32)
I just wanted to check if anyone have any insights or opinions on this before I start implementing, or if there is an api to achieve this already that I have somehow missed?
The text was updated successfully, but these errors were encountered: