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
first() and last() methods like RoaringBitmap in Roaring64Bitmap #583
Comments
You can use |
Thanks. I was also reading the code,
also seem to work. |
Select is linear in the number of bits, the reverse iterator is constant time. Specialised first and last methods would be more efficient though, if someone wants to add them. |
@richardstartin is correct. The iterators are better, but we could do even better with specialized functions. |
* Introduce .first and .last to 64 implementation #583 * Restore unexpected change of char to int * Cast low part from int to char * step-fown the Art manually * Improve Style, add test by refactoring source for allKindsOfNodes * Improve behavior and tests if RB64 is empty
Is your feature request related to a problem? Please describe.
RoaringBitmap provides first() and last() methods to determine the start and end values present in the bitmap. These methods are not present in the latest release. There are couple of alternatives which available are
Roaring64Bitmap.toArray()
and then get the first/last values in the array. There is also aRoaring64Bitmap.query(j)
, withquery()
function can we use.cardinatliy
to get the first/last values in the bitmap ?Describe the solution you'd like
Whats the most efficient way to get the first() and last() values in the bitmap without iterating over the entire dataset ?
Please note that this is a community-based project. Consider proposing a fix (code, documentation) as a pull request.
The text was updated successfully, but these errors were encountered: