CRoaring icon indicating copy to clipboard operation
CRoaring copied to clipboard

Improve consistency in the C++ interface

Open cubicYYY opened this issue 1 year ago • 1 comments

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:

  • 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 the api::roaring_bitmap_flip_inplace_closed method.
  • Add the api::roaring_bitmap_contains_range_closed method.
  • Add the api::roaring_bitmap_flip_closed method.
  • Add the api::roaring_bitmap_range_cardinality_closed method.
  • Other minor changes.

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 class Roaring64Map):

  • [ ] 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.

cubicYYY avatar Aug 20 '24 15:08 cubicYYY

Looks good to me. I invited others to comment.

Let us keep the breaking changes to a minimum. Deprecation is fine.

lemire avatar Aug 20 '24 17:08 lemire

Running tests with the latest changes.

lemire avatar Sep 19 '24 00:09 lemire

Merging.

lemire avatar Sep 30 '24 19:09 lemire