-
Notifications
You must be signed in to change notification settings - Fork 43
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
Port get_index
and the bitset functions
#107
Port get_index
and the bitset functions
#107
Conversation
`Bitmap::position` is implmemented in terms of the new `roaring_bitmap_get_index` function. The name `position` was chosen because it mirrors the rust `Iterator::position` function, which does the same thing.
CRoaring introduced a `bitset` type, and the abilty to convert a roaring bitmap into a dense bitset. This adds wrappers around the new bitset functions
#[inline] | ||
#[doc(alias = "bitset_clear")] | ||
#[doc(alias = "bitset_fill")] | ||
pub fn fill(&mut self, value: bool) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I like this. Any reason why bitset_clear
and bitset_fill
aren't separate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thoughts were to be closer to <[bool]>::fill
, and that since it's inline, .fill(constant)
will be optimized to a single call without a branch anyway.
I really don't want to use the name clear
(since it's too similar to Vec::clear
but does something VERY different), so the alternative in my mind would be Bitset::fill_zeros
and Bitset::fill_ones
.
I'm not hard set on this option, but it seemed like the best option to me.
Really struggling to find proper time to review larger amounts of code lately, but generally it looks great to me! Thanks one more time for the contribution. On that note, @Dr-Emann, you made some great contributions over the last years to |
I'm currently advocating for the |
I'd certainly be willing to help maintain the project, and I also personally think it would make sense to end up under the RoaringBitmap org. |
roaring_bitmap_get_index
asBitmap::position
(the name was chosen to match withIterator::position
)bitset_*
methods/types/variablesbitset_*
functions, androaring_bitmap_to_bitset
asBitmap::to_bitset
Because of the version update, this will clash with #105 and #106