Skip to content
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

Add Bitmap.NextAbsentValue #380

Open
ghost opened this issue Jan 27, 2023 · 5 comments
Open

Add Bitmap.NextAbsentValue #380

ghost opened this issue Jan 27, 2023 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 27, 2023

Java implementation has nextAbsentValue method. Go implementation doesn't. Could you please add it?

https://www.javadoc.io/doc/org.roaringbitmap/RoaringBitmap

public long nextAbsentValue​(int fromValue)

Returns the first absent value equal to or larger than
the provided value (interpreted as an unsigned integer).
It is not necessarily a computationally effective way
to iterate through the values.

Parameters:
    fromValue - the lower bound (inclusive)
Returns:
    the smallest absent value larger than or equal to
    the specified value.
@lemire
Copy link
Member

lemire commented Jan 27, 2023

That's a good issue. Do you want to try it out?

@lemire
Copy link
Member

lemire commented Jan 27, 2023

A PR is invited.

@ghost
Copy link
Author

ghost commented Feb 6, 2023

Looks like a lot of work. I don't think I need this method anymore, nor do I need the companion functions previousAbsentValue, nextValue, previousValue.

@lemire
Copy link
Member

lemire commented Feb 6, 2023

Looks like a lot of work.

It is not too bad, but it requires a minimum of care and a few hours.

@bearrito
Copy link

bearrito commented May 5, 2024

@lemire Once the validation stuff gets in I'll grab this. I think have a good enough grasp on the data structures to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants