-
Notifications
You must be signed in to change notification settings - Fork 272
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
Improve consistency in the C++ interface #653
Conversation
These changes aim to improve the consistency of the C++ API between the 32-bit version and the 64-bit version. Details: - Rename `RoaringSetBitForwardIterator` to `RoaringSetBitBiDirectionalIterator` (the old one is now deprecated). - Add methods: `Roaring::clear` `Roaring::isFull` `Roaring::containsRangeClosed`. - Revise `move_equalorlarger` methods in iterators. - Add `api::roaring_bitmap_flip_inplace_closed` method. - Add `api::roaring_bitmap_contains_range_closed` method. - Add `api::roaring_bitmap_flip_closed` method. - Other minor changes.
Looks good to me. I invited others to comment. Let us keep the breaking changes to a minimum. Deprecation is fine. |
Main changes: - Add the `api::roaring_bitmap_range_cardinality_closed` method. - Add boundary checks for methods: `api::roaring_bitmap_add_range` `api::roaring_bitmap_remove_range`.
class RoaringSetBitBiDirectionalIterator; | ||
|
||
/** DEPRECATED, use `RoaringSetBitBiDirectionalIterator`. */ | ||
using RoaringSetBitForwardIterator = RoaringSetBitBiDirectionalIterator; |
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.
Can we use CROARING_DEPRECATED
?
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.
I'd like to, but:
- currently, the
Roaring64MapSetBitForwardIterator
is not marked as deprecated. CROARING_DEPRECATED
expands to__attribute__((deprecated))
for GNUC and Clang, sousing xxx CROARING_DEPRECATED = xxx;
works. However, for MSVC, it expands to__declspec(deprecated)
, which won't work in this format.
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.
Looks good, some small nits.
Running tests with the latest changes. |
Merging. |
These changes aim to improve the consistency of the C++ API between the 32-bit version and the 64-bit version.
Related issues: #629
Changes:
RoaringSetBitForwardIterator
toRoaringSetBitBiDirectionalIterator
(the old one is now deprecated).Roaring::clear
Roaring::isFull
Roaring::containsRangeClosed
.move_equalorlarger
methods in iterators.api::roaring_bitmap_flip_inplace_closed
method.api::roaring_bitmap_contains_range_closed
method.api::roaring_bitmap_flip_closed
method.api::roaring_bitmap_range_cardinality_closed
method.If merged, only the following methods remain that are only implemented in the 32-bit version(in class
Roaring
) but not in the 64-bit version(in classRoaring64Map
):containsRange
rangeUint64Array
and_cardinality
or_cardinality
andnot_cardinality
xor_cardinality
jaccard_index
rank_many
Also, the methods mentioned in #549 need to be further implemented.