-Definition at line 980 of file roaring.h .
+Definition at line 1016 of file roaring.h .
diff --git a/da/d37/classroaring_1_1RoaringSetBitForwardIterator.html b/da/d37/classroaring_1_1RoaringSetBitForwardIterator.html
deleted file mode 100644
index 32c3d307a..000000000
--- a/da/d37/classroaring_1_1RoaringSetBitForwardIterator.html
+++ /dev/null
@@ -1,682 +0,0 @@
-
-
-
-
-
-
-
-CRoaring: roaring::RoaringSetBitForwardIterator Class Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CRoaring
- 4.1.7
-
- Roaring bitmaps in C (and C++)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
#include <roaring.hh >
-
-
-
Used to go through the set bits. Not optimally fast, but convenient.
-
-
Definition at line 896 of file roaring.hh .
-
-
-
◆ difference_type
-
-
-
-
◆ iterator_category
-
-
-
-
◆ pointer
-
-
-
-
◆ reference_type
-
-
-
-
◆ type_of_iterator
-
-
-
-
◆ value_type
-
-
-
-
-
◆ RoaringSetBitForwardIterator()
-
-
-
-
-
-
-
-
- roaring::RoaringSetBitForwardIterator::RoaringSetBitForwardIterator
- (
- const Roaring &
- parent ,
-
-
-
-
- bool
- exhausted = false
-
-
-
- )
-
-
-
-
-
-inline explicit
-
-
-
-
-
-
-
◆ equalorlarger()
-
-
-
-
-
-
-
-
- void roaring::RoaringSetBitForwardIterator::equalorlarger
- (
- uint32_t
- val )
-
-
-
-
-
-inline
-
-
-
-
-
-
◆ operator!=()
-
-
-
-
◆ operator*()
-
-
-
-
-
-
-
-
- value_type roaring::RoaringSetBitForwardIterator::operator*
- (
- )
- const
-
-
-
-
-inline
-
-
-
-
Provides the location of the set bit.
-
-
Definition at line 908 of file roaring.hh .
-
-
-
-
-
◆ operator++() [1/2]
-
-
-
-
-
-
-
-
- type_of_iterator & roaring::RoaringSetBitForwardIterator::operator++
- (
- )
-
-
-
-
-
-inline
-
-
-
-
-
-
◆ operator++() [2/2]
-
-
-
-
-
-
-
-
- type_of_iterator roaring::RoaringSetBitForwardIterator::operator++
- (
- int
- )
-
-
-
-
-
-inline
-
-
-
-
-
-
◆ operator--() [1/2]
-
-
-
-
-
-
-
-
- type_of_iterator & roaring::RoaringSetBitForwardIterator::operator--
- (
- )
-
-
-
-
-
-inline
-
-
-
-
-
-
◆ operator--() [2/2]
-
-
-
-
-
-
-
-
- type_of_iterator roaring::RoaringSetBitForwardIterator::operator--
- (
- int
- )
-
-
-
-
-
-inline
-
-
-
-
-
-
◆ operator<()
-
-
-
-
-
-
-
-
- bool roaring::RoaringSetBitForwardIterator::operator<
- (
- const type_of_iterator &
- o )
- const
-
-
-
-
-inline
-
-
-
-
-
-
◆ operator<=()
-
-
-
-
-
-
-
-
- bool roaring::RoaringSetBitForwardIterator::operator<=
- (
- const type_of_iterator &
- o )
- const
-
-
-
-
-inline
-
-
-
-
-
-
◆ operator==()
-
-
-
-
◆ operator>()
-
-
-
-
-
-
-
-
- bool roaring::RoaringSetBitForwardIterator::operator>
- (
- const type_of_iterator &
- o )
- const
-
-
-
-
-inline
-
-
-
-
-
-
◆ operator>=()
-
-
-
-
-
-
-
-
- bool roaring::RoaringSetBitForwardIterator::operator>=
- (
- const type_of_iterator &
- o )
- const
-
-
-
-
-inline
-
-
-
-
-
-
-
-
-
-
The documentation for this class was generated from the following file:
-
-
-
-
-
-
diff --git a/da/d37/classroaring_1_1RoaringSetBitForwardIterator.js b/da/d37/classroaring_1_1RoaringSetBitForwardIterator.js
deleted file mode 100644
index 580854ee0..000000000
--- a/da/d37/classroaring_1_1RoaringSetBitForwardIterator.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var classroaring_1_1RoaringSetBitForwardIterator =
-[
- [ "difference_type", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#aae6d9aed28f9c6110899b54238a85b20", null ],
- [ "iterator_category", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#a9c151ea75262aaf9752ab727aa8cb9ab", null ],
- [ "pointer", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#a88ae3f9d1d9283e061302b3bbecc350c", null ],
- [ "reference_type", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#a9f79b7ce3247302921c674606737af09", null ],
- [ "type_of_iterator", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#abfb27a5e94de247e54101a1b2bb07588", null ],
- [ "value_type", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#a5f3095883c14f706fc9007a22e6318a9", null ],
- [ "RoaringSetBitForwardIterator", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#a1ef72775d6409f1e9b1aaf90904e7be5", null ],
- [ "equalorlarger", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#a97c7bac108fd9c06d290ab4823b12ad5", null ],
- [ "operator!=", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#aebf41cb17d2d1734b1b8a146e0bf25b2", null ],
- [ "operator*", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#a1c71071aa714b3e853f89ce90c455a3f", null ],
- [ "operator++", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#af69d848d67e8fa9b90efd30f4b71db50", null ],
- [ "operator++", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#acb31aefcfd664fd886e897f2b6370da5", null ],
- [ "operator--", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#af6bd7a97cc51c998b37c8ee026380750", null ],
- [ "operator--", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#a60321d71ee34c5c8cc577fc05678091f", null ],
- [ "operator<", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#a0ceeba88c56a1c54983d0f0c6c366c28", null ],
- [ "operator<=", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#a2f33213fe62eedd064130eb9e24758a0", null ],
- [ "operator==", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#aad98a805d5c7320c1c0a9296a62ff096", null ],
- [ "operator>", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#a1e174f159456ae7867f4e99467764378", null ],
- [ "operator>=", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#a45632a1dc8873d4905522e857c07f4d2", null ],
- [ "i", "da/d37/classroaring_1_1RoaringSetBitForwardIterator.html#a7ef4efb277fe239608d0f368cbe25126", null ]
-];
\ No newline at end of file
diff --git a/db/d19/classroaring_1_1RoaringSetBitBiDirectionalIterator-members.html b/db/d19/classroaring_1_1RoaringSetBitBiDirectionalIterator-members.html
new file mode 100644
index 000000000..4ad5be684
--- /dev/null
+++ b/db/d19/classroaring_1_1RoaringSetBitBiDirectionalIterator-members.html
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+CRoaring: Member List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CRoaring
+ 4.1.7
+
+ Roaring bitmaps in C (and C++)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This is the complete list of members for roaring::RoaringSetBitBiDirectionalIterator , including all inherited members.
+
+
+
+
+
+
diff --git a/db/d2c/roaring64map_8hh_source.html b/db/d2c/roaring64map_8hh_source.html
index 3eb75ccb0..5a33dff78 100644
--- a/db/d2c/roaring64map_8hh_source.html
+++ b/db/d2c/roaring64map_8hh_source.html
@@ -471,1284 +471,1285 @@
493 return iter->second.contains(lowBytes(x));
-
- 505 if (
this == &other) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 524 decltype(roarings.begin()) self_next;
- 525 for (
auto self_iter = roarings.begin(); self_iter != roarings.end();
- 526 self_iter = self_next) {
-
-
- 529 self_next = std::next(self_iter);
-
- 531 auto self_key = self_iter->first;
- 532 auto &self_bitmap = self_iter->second;
-
- 534 auto other_iter = other.roarings.find(self_key);
- 535 if (other_iter == other.roarings.end()) {
-
-
-
- 539 roarings.erase(self_iter);
-
-
-
-
-
-
- 546 const auto &other_bitmap = other_iter->second;
- 547 self_bitmap &= other_bitmap;
- 548 if (self_bitmap.isEmpty()) {
-
- 550 roarings.erase(self_iter);
-
-
-
-
-
-
- 562 if (
this == &other) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 583 auto self_iter = roarings.begin();
- 584 auto other_iter = other.roarings.cbegin();
-
- 586 while (self_iter != roarings.end() &&
- 587 other_iter != other.roarings.cend()) {
- 588 auto self_key = self_iter->first;
- 589 auto other_key = other_iter->first;
- 590 if (self_key < other_key) {
-
-
- 593 self_iter = roarings.lower_bound(other_key);
-
-
-
- 597 if (self_key > other_key) {
-
-
- 600 other_iter = other.roarings.lower_bound(self_key);
-
-
-
-
-
-
- 607 auto &self_bitmap = self_iter->second;
- 608 const auto &other_bitmap = other_iter->second;
- 609 self_bitmap -= other_bitmap;
-
- 611 if (self_bitmap.isEmpty()) {
-
- 613 self_iter = roarings.erase(self_iter);
-
-
-
-
-
-
-
-
-
- 630 if (
this == &other) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 648 for (
const auto &other_entry : other.roarings) {
- 649 const auto &other_bitmap = other_entry.second;
-
-
-
-
- 654 auto insert_result = roarings.insert(other_entry);
- 655 auto self_iter = insert_result.first;
- 656 auto insert_happened = insert_result.second;
- 657 auto &self_bitmap = self_iter->second;
-
- 659 if (insert_happened) {
-
-
-
-
-
- 665 self_bitmap.setCopyOnWrite(copyOnWrite);
-
-
-
-
-
-
- 672 self_bitmap |= other_bitmap;
-
-
-
-
-
- 682 if (
this == &other) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 702 for (
const auto &other_entry : other.roarings) {
- 703 const auto &other_bitmap = other_entry.second;
-
-
-
-
- 708 auto insert_result = roarings.insert(other_entry);
- 709 auto self_iter = insert_result.first;
- 710 auto insert_happened = insert_result.second;
- 711 auto &self_bitmap = self_iter->second;
-
- 713 if (insert_happened) {
-
-
-
-
-
- 719 self_bitmap.setCopyOnWrite(copyOnWrite);
-
-
-
-
-
-
- 726 self_bitmap ^= other_bitmap;
-
- 728 if (self_bitmap.isEmpty()) {
-
- 730 roarings.erase(self_iter);
-
-
-
-
-
-
-
-
-
- 749 #if ROARING_EXCEPTIONS
- 750 throw std::length_error(
- 751 "bitmap is full, cardinality is 2^64, "
- 752 "unable to represent in a 64-bit integer" );
-
-
- 755 "bitmap is full, cardinality is 2^64, "
- 756 "unable to represent in a 64-bit integer" );
-
-
- 759 return std::accumulate(
- 760 roarings.cbegin(), roarings.cend(), (uint64_t)0,
- 761 [](uint64_t previous,
- 762 const std::pair<const uint32_t, Roaring> &map_entry) {
- 763 return previous + map_entry.second.cardinality();
-
-
-
-
-
- 772 roarings.cbegin(), roarings.cend(),
- 773 [](
const std::pair<const uint32_t, Roaring> &map_entry) {
- 774 return map_entry.second.isEmpty();
-
-
-
-
-
-
-
-
- 786 return roarings.size() ==
- 787 ((uint64_t)(std::numeric_limits<uint32_t>::max)()) + 1
-
- 789 roarings.cbegin(), roarings.cend(),
- 790 [](
const std::pair<const uint32_t, Roaring>
- 791 &roaring_map_entry) {
-
-
- 794 return roaring_map_entry.second.cardinality() ==
- 795 ((uint64_t)(std::numeric_limits<
-
-
-
-
-
-
-
- 806 for (
const auto &map_entry : roarings) {
- 807 if (map_entry.second.isEmpty()) {
-
-
- 810 auto roaring_iter = r.roarings.find(map_entry.first);
- 811 if (roaring_iter == r.roarings.cend())
-
- 813 else if (!map_entry.second.isSubset(roaring_iter->second))
-
-
-
-
-
-
-
-
-
-
-
- 837 (void)std::accumulate(
- 838 roarings.cbegin(), roarings.cend(), ans,
- 839 [](uint64_t *previous,
- 840 const std::pair<const uint32_t, Roaring> &map_entry) {
- 841 for (uint32_t low_bits : map_entry.second)
- 842 *previous++ = uniteBytes(map_entry.first, low_bits);
-
-
-
-
-
-
-
- 853 auto lhs_iter = roarings.cbegin();
- 854 auto lhs_cend = roarings.cend();
- 855 auto rhs_iter = r.roarings.cbegin();
- 856 auto rhs_cend = r.roarings.cend();
- 857 while (lhs_iter != lhs_cend && rhs_iter != rhs_cend) {
- 858 auto lhs_key = lhs_iter->first, rhs_key = rhs_iter->first;
- 859 const auto &lhs_map = lhs_iter->second, &rhs_map = rhs_iter->second;
- 860 if (lhs_map.isEmpty()) {
-
+
+
+
+ 507 if (
this == &other) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 526 decltype(roarings.begin()) self_next;
+ 527 for (
auto self_iter = roarings.begin(); self_iter != roarings.end();
+ 528 self_iter = self_next) {
+
+
+ 531 self_next = std::next(self_iter);
+
+ 533 auto self_key = self_iter->first;
+ 534 auto &self_bitmap = self_iter->second;
+
+ 536 auto other_iter = other.roarings.find(self_key);
+ 537 if (other_iter == other.roarings.end()) {
+
+
+
+ 541 roarings.erase(self_iter);
+
+
+
+
+
+
+ 548 const auto &other_bitmap = other_iter->second;
+ 549 self_bitmap &= other_bitmap;
+ 550 if (self_bitmap.isEmpty()) {
+
+ 552 roarings.erase(self_iter);
+
+
+
+
+
+
+ 564 if (
this == &other) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 585 auto self_iter = roarings.begin();
+ 586 auto other_iter = other.roarings.cbegin();
+
+ 588 while (self_iter != roarings.end() &&
+ 589 other_iter != other.roarings.cend()) {
+ 590 auto self_key = self_iter->first;
+ 591 auto other_key = other_iter->first;
+ 592 if (self_key < other_key) {
+
+
+ 595 self_iter = roarings.lower_bound(other_key);
+
+
+
+ 599 if (self_key > other_key) {
+
+
+ 602 other_iter = other.roarings.lower_bound(self_key);
+
+
+
+
+
+
+ 609 auto &self_bitmap = self_iter->second;
+ 610 const auto &other_bitmap = other_iter->second;
+ 611 self_bitmap -= other_bitmap;
+
+ 613 if (self_bitmap.isEmpty()) {
+
+ 615 self_iter = roarings.erase(self_iter);
+
+
+
+
+
+
+
+
+
+ 632 if (
this == &other) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 650 for (
const auto &other_entry : other.roarings) {
+ 651 const auto &other_bitmap = other_entry.second;
+
+
+
+
+ 656 auto insert_result = roarings.insert(other_entry);
+ 657 auto self_iter = insert_result.first;
+ 658 auto insert_happened = insert_result.second;
+ 659 auto &self_bitmap = self_iter->second;
+
+ 661 if (insert_happened) {
+
+
+
+
+
+ 667 self_bitmap.setCopyOnWrite(copyOnWrite);
+
+
+
+
+
+
+ 674 self_bitmap |= other_bitmap;
+
+
+
+
+
+ 684 if (
this == &other) {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 704 for (
const auto &other_entry : other.roarings) {
+ 705 const auto &other_bitmap = other_entry.second;
+
+
+
+
+ 710 auto insert_result = roarings.insert(other_entry);
+ 711 auto self_iter = insert_result.first;
+ 712 auto insert_happened = insert_result.second;
+ 713 auto &self_bitmap = self_iter->second;
+
+ 715 if (insert_happened) {
+
+
+
+
+
+ 721 self_bitmap.setCopyOnWrite(copyOnWrite);
+
+
+
+
+
+
+ 728 self_bitmap ^= other_bitmap;
+
+ 730 if (self_bitmap.isEmpty()) {
+
+ 732 roarings.erase(self_iter);
+
+
+
+
+
+
+
+
+
+ 751 #if ROARING_EXCEPTIONS
+ 752 throw std::length_error(
+ 753 "bitmap is full, cardinality is 2^64, "
+ 754 "unable to represent in a 64-bit integer" );
+
+
+ 757 "bitmap is full, cardinality is 2^64, "
+ 758 "unable to represent in a 64-bit integer" );
+
+
+ 761 return std::accumulate(
+ 762 roarings.cbegin(), roarings.cend(), (uint64_t)0,
+ 763 [](uint64_t previous,
+ 764 const std::pair<const uint32_t, Roaring> &map_entry) {
+ 765 return previous + map_entry.second.cardinality();
+
+
+
+
+
+ 774 roarings.cbegin(), roarings.cend(),
+ 775 [](
const std::pair<const uint32_t, Roaring> &map_entry) {
+ 776 return map_entry.second.isEmpty();
+
+
+
+
+
+
+
+
+ 788 return roarings.size() ==
+ 789 ((uint64_t)(std::numeric_limits<uint32_t>::max)()) + 1
+ 790 ? std::all_of(roarings.cbegin(), roarings.cend(),
+ 791 [](
const std::pair<const uint32_t, Roaring>
+ 792 &roaring_map_entry) {
+ 793 return roaring_map_entry.second.isFull();
+
+
+
+
+
+ 802 for (
const auto &map_entry : roarings) {
+ 803 if (map_entry.second.isEmpty()) {
+
+
+ 806 auto roaring_iter = r.roarings.find(map_entry.first);
+ 807 if (roaring_iter == r.roarings.cend())
+
+ 809 else if (!map_entry.second.isSubset(roaring_iter->second))
+
+
+
+
+
+
+
+
+
+
+
+ 833 (void)std::accumulate(
+ 834 roarings.cbegin(), roarings.cend(), ans,
+ 835 [](uint64_t *previous,
+ 836 const std::pair<const uint32_t, Roaring> &map_entry) {
+ 837 for (uint32_t low_bits : map_entry.second)
+ 838 *previous++ = uniteBytes(map_entry.first, low_bits);
+
+
+
+
+
+
+
+ 849 auto lhs_iter = roarings.cbegin();
+ 850 auto lhs_cend = roarings.cend();
+ 851 auto rhs_iter = r.roarings.cbegin();
+ 852 auto rhs_cend = r.roarings.cend();
+ 853 while (lhs_iter != lhs_cend && rhs_iter != rhs_cend) {
+ 854 auto lhs_key = lhs_iter->first, rhs_key = rhs_iter->first;
+ 855 const auto &lhs_map = lhs_iter->second, &rhs_map = rhs_iter->second;
+ 856 if (lhs_map.isEmpty()) {
+
+
+
+ 860 if (rhs_map.isEmpty()) {
+
- 864 if (rhs_map.isEmpty()) {
-
-
-
- 868 if (!(lhs_key == rhs_key)) {
-
-
- 871 if (!(lhs_map == rhs_map)) {
-
-
-
-
-
- 877 while (lhs_iter != lhs_cend) {
- 878 if (!lhs_iter->second.isEmpty()) {
-
-
-
-
- 883 while (rhs_iter != rhs_cend) {
- 884 if (!rhs_iter->second.isEmpty()) {
-
-
-
-
-
-
-
- 896 void flip (uint64_t min, uint64_t max) {
-
-
-
-
-
-
-
- 908 auto iter = roarings.begin();
-
-
-
- 912 if (iter == roarings.end() || iter->first != 0) {
- 913 iter = roarings.emplace_hint(iter, std::piecewise_construct,
- 914 std::forward_as_tuple(0),
- 915 std::forward_as_tuple());
- 916 auto &bitmap = iter->second;
- 917 bitmap.setCopyOnWrite(copyOnWrite);
-
- 919 auto &bitmap = iter->second;
- 920 bitmap.flipClosed(min, max);
-
-
-
-
-
-
-
- 932 uint32_t start_high = highBytes(min);
- 933 uint32_t start_low = lowBytes(min);
- 934 uint32_t end_high = highBytes(max);
- 935 uint32_t end_low = lowBytes(max);
+ 864 if (!(lhs_key == rhs_key)) {
+
+
+ 867 if (!(lhs_map == rhs_map)) {
+
+
+
+
+
+ 873 while (lhs_iter != lhs_cend) {
+ 874 if (!lhs_iter->second.isEmpty()) {
+
+
+
+
+ 879 while (rhs_iter != rhs_cend) {
+ 880 if (!rhs_iter->second.isEmpty()) {
+
+
+
+
+
+
+
+ 892 void flip (uint64_t min, uint64_t max) {
+
+
+
+
+
+
+
+ 904 auto iter = roarings.begin();
+
+
+
+ 908 if (iter == roarings.end() || iter->first != 0) {
+ 909 iter = roarings.emplace_hint(iter, std::piecewise_construct,
+ 910 std::forward_as_tuple(0),
+ 911 std::forward_as_tuple());
+ 912 auto &bitmap = iter->second;
+ 913 bitmap.setCopyOnWrite(copyOnWrite);
+
+ 915 auto &bitmap = iter->second;
+ 916 bitmap.flipClosed(min, max);
+
+
+
+
+
+
+
+ 928 uint32_t start_high = highBytes(min);
+ 929 uint32_t start_low = lowBytes(min);
+ 930 uint32_t end_high = highBytes(max);
+ 931 uint32_t end_low = lowBytes(max);
+
+
+
+ 935 const uint32_t uint32_max = (std::numeric_limits<uint32_t>::max)();
-
-
- 939 const uint32_t uint32_max = (std::numeric_limits<uint32_t>::max)();
-
-
-
-
- 944 auto current_iter = ensureRangePopulated(start_high, end_high);
-
-
-
- 948 if (start_high == end_high) {
- 949 auto &bitmap = current_iter->second;
- 950 bitmap.flipClosed(start_low, end_low);
- 951 eraseIfEmpty(current_iter);
-
-
-
-
-
-
-
-
-
-
-
- 963 auto num_intermediate_bitmaps = end_high - start_high - 1;
-
-
-
- 967 auto &bitmap = current_iter->second;
- 968 bitmap.flipClosed(start_low, uint32_max);
- 969 auto temp = current_iter++;
-
-
-
-
- 974 for (uint32_t i = 0; i != num_intermediate_bitmaps; ++i) {
- 975 auto &bitmap = current_iter->second;
- 976 bitmap.flipClosed(0, uint32_max);
- 977 auto temp = current_iter++;
-
-
-
-
- 982 auto &bitmap = current_iter->second;
- 983 bitmap.flipClosed(0, end_low);
- 984 eraseIfEmpty(current_iter);
-
-
-
- 992 return std::accumulate(
- 993 roarings.begin(), roarings.end(),
true ,
- 994 [](
bool previous, std::pair<const uint32_t, Roaring> &map_entry) {
- 995 return map_entry.second.removeRunCompression() && previous;
-
-
-
-
- 1006 return std::accumulate(
- 1007 roarings.begin(), roarings.end(),
true ,
- 1008 [](
bool previous, std::pair<const uint32_t, Roaring> &map_entry) {
- 1009 return map_entry.second.runOptimize() && previous;
-
-
-
-
- 1018 size_t savedBytes = 0;
- 1019 auto iter = roarings.begin();
- 1020 while (iter != roarings.cend()) {
- 1021 if (iter->second.isEmpty()) {
-
-
- 1024 roarings.erase(iter++);
-
- 1026 savedBytes += iter->second.shrinkToFit();
-
-
-
-
-
-
- 1044 void iterate (api::roaring_iterator64 iterator,
void *ptr)
const {
- 1045 for (
const auto &map_entry : roarings) {
- 1046 bool should_continue =
-
- 1048 uint64_t(map_entry.first) << 32, ptr);
- 1049 if (!should_continue) {
-
-
-
-
-
-
- 1062 for (
const auto &map_entry : roarings) {
- 1063 auto key = map_entry.first;
- 1064 const auto &bitmap = map_entry.second;
-
- 1066 uint64_t sub_cardinality = bitmap.cardinality();
- 1067 if (
rank < sub_cardinality) {
-
-
-
- 1071 if (!bitmap.select((uint32_t)
rank , &low_bytes)) {
-
- 1073 "Logic error: bitmap.select() "
- 1074 "returned false despite rank < cardinality()" );
-
- 1076 *element = uniteBytes(key, low_bytes);
-
-
- 1079 rank -= sub_cardinality;
-
-
-
-
-
- 1088 uint64_t result = 0;
-
-
-
-
- 1093 auto end = roarings.lower_bound(highBytes(x));
- 1094 if (
end != roarings.cend() &&
end ->first == highBytes(x)) {
- 1095 result +=
end ->second.rank(lowBytes(x));
-
- 1097 for (
auto iter = roarings.cbegin(); iter !=
end ; ++iter) {
- 1098 result += iter->second.cardinality();
-
-
-
-
-
-
- 1112 auto roaring_destination = roarings.find(highBytes(x));
- 1113 if (roaring_destination != roarings.cend()) {
- 1114 for (
auto roaring_iter = roarings.cbegin();
- 1115 roaring_iter != roaring_destination; ++roaring_iter) {
- 1116 index += roaring_iter->second.cardinality();
-
- 1118 auto low_idx = roaring_destination->second.getIndex(lowBytes(x));
- 1119 if (low_idx < 0)
return -1;
-
-
-
-
-
-
- 1135 size_t write (
char *buf,
bool portable =
true )
const {
- 1136 const char *orig = buf;
-
- 1138 uint64_t map_size = roarings.size();
- 1139 std::memcpy(buf, &map_size,
sizeof (uint64_t));
- 1140 buf +=
sizeof (uint64_t);
- 1141 std::for_each(roarings.cbegin(), roarings.cend(),
-
- 1143 const std::pair<const uint32_t, Roaring> &map_entry) {
-
- 1145 std::memcpy(buf, &map_entry.first, sizeof(uint32_t));
-
-
-
- 1149 buf += sizeof(uint32_t);
-
- 1151 buf += map_entry.second.write(buf, portable);
-
-
-
-
-
-
-
-
- 1172 std::memcpy(&map_size, buf,
sizeof (uint64_t));
- 1173 buf +=
sizeof (uint64_t);
- 1174 for (uint64_t lcv = 0; lcv < map_size; lcv++) {
-
-
- 1177 std::memcpy(&key, buf,
sizeof (uint32_t));
-
-
- 1180 buf +=
sizeof (uint32_t);
-
-
-
-
- 1185 result.emplaceOrInsert(key, std::move(read_var));
-
-
-
-
-
- 1198 if (maxbytes <
sizeof (uint64_t)) {
-
-
-
-
- 1203 std::memcpy(&map_size, buf,
sizeof (uint64_t));
- 1204 buf +=
sizeof (uint64_t);
- 1205 maxbytes -=
sizeof (uint64_t);
- 1206 for (uint64_t lcv = 0; lcv < map_size; lcv++) {
- 1207 if (maxbytes <
sizeof (uint32_t)) {
-
-
-
- 1211 std::memcpy(&key, buf,
sizeof (uint32_t));
-
-
- 1214 buf +=
sizeof (uint32_t);
- 1215 maxbytes -=
sizeof (uint32_t);
-
-
-
-
-
-
- 1222 result.emplaceOrInsert(key, std::move(read_var));
-
-
-
-
-
-
-
- 1237 return std::accumulate(
- 1238 roarings.cbegin(), roarings.cend(),
- 1239 sizeof (uint64_t) + roarings.size() *
sizeof (uint32_t),
- 1240 [=](
size_t previous,
- 1241 const std::pair<const uint32_t, Roaring> &map_entry) {
-
- 1243 return previous + map_entry.second.getSizeInBytes(portable);
-
-
+
+
+
+ 940 auto current_iter = ensureRangePopulated(start_high, end_high);
+
+
+
+ 944 if (start_high == end_high) {
+ 945 auto &bitmap = current_iter->second;
+ 946 bitmap.flipClosed(start_low, end_low);
+ 947 eraseIfEmpty(current_iter);
+
+
+
+
+
+
+
+
+
+
+
+ 959 auto num_intermediate_bitmaps = end_high - start_high - 1;
+
+
+
+ 963 auto &bitmap = current_iter->second;
+ 964 bitmap.flipClosed(start_low, uint32_max);
+ 965 auto temp = current_iter++;
+
+
+
+
+ 970 for (uint32_t i = 0; i != num_intermediate_bitmaps; ++i) {
+ 971 auto &bitmap = current_iter->second;
+ 972 bitmap.flipClosed(0, uint32_max);
+ 973 auto temp = current_iter++;
+
+
+
+
+ 978 auto &bitmap = current_iter->second;
+ 979 bitmap.flipClosed(0, end_low);
+ 980 eraseIfEmpty(current_iter);
+
+
+
+ 988 return std::accumulate(
+ 989 roarings.begin(), roarings.end(),
true ,
+ 990 [](
bool previous, std::pair<const uint32_t, Roaring> &map_entry) {
+ 991 return map_entry.second.removeRunCompression() && previous;
+
+
+
+
+ 1002 return std::accumulate(
+ 1003 roarings.begin(), roarings.end(),
true ,
+ 1004 [](
bool previous, std::pair<const uint32_t, Roaring> &map_entry) {
+ 1005 return map_entry.second.runOptimize() && previous;
+
+
+
+
+ 1014 size_t savedBytes = 0;
+ 1015 auto iter = roarings.begin();
+ 1016 while (iter != roarings.cend()) {
+ 1017 if (iter->second.isEmpty()) {
+
+
+ 1020 roarings.erase(iter++);
+
+ 1022 savedBytes += iter->second.shrinkToFit();
+
+
+
+
+
+
+ 1040 void iterate (api::roaring_iterator64 iterator,
void *ptr)
const {
+ 1041 for (
const auto &map_entry : roarings) {
+ 1042 bool should_continue =
+
+ 1044 uint64_t(map_entry.first) << 32, ptr);
+ 1045 if (!should_continue) {
+
+
+
+
+
+
+ 1058 for (
const auto &map_entry : roarings) {
+ 1059 auto key = map_entry.first;
+ 1060 const auto &bitmap = map_entry.second;
+
+ 1062 uint64_t sub_cardinality = bitmap.cardinality();
+ 1063 if (
rank < sub_cardinality) {
+
+
+
+ 1067 if (!bitmap.select((uint32_t)
rank , &low_bytes)) {
+
+ 1069 "Logic error: bitmap.select() "
+ 1070 "returned false despite rank < cardinality()" );
+
+ 1072 *element = uniteBytes(key, low_bytes);
+
+
+ 1075 rank -= sub_cardinality;
+
+
+
+
+
+ 1084 uint64_t result = 0;
+
+
+
+
+ 1089 auto end = roarings.lower_bound(highBytes(x));
+ 1090 if (
end != roarings.cend() &&
end ->first == highBytes(x)) {
+ 1091 result +=
end ->second.rank(lowBytes(x));
+
+ 1093 for (
auto iter = roarings.cbegin(); iter !=
end ; ++iter) {
+ 1094 result += iter->second.cardinality();
+
+
+
+
+
+
+ 1108 auto roaring_destination = roarings.find(highBytes(x));
+ 1109 if (roaring_destination != roarings.cend()) {
+ 1110 for (
auto roaring_iter = roarings.cbegin();
+ 1111 roaring_iter != roaring_destination; ++roaring_iter) {
+ 1112 index += roaring_iter->second.cardinality();
+
+ 1114 auto low_idx = roaring_destination->second.getIndex(lowBytes(x));
+ 1115 if (low_idx < 0)
return -1;
+
+
+
+
+
+
+ 1131 size_t write (
char *buf,
bool portable =
true )
const {
+ 1132 const char *orig = buf;
+
+ 1134 uint64_t map_size = roarings.size();
+ 1135 std::memcpy(buf, &map_size,
sizeof (uint64_t));
+ 1136 buf +=
sizeof (uint64_t);
+ 1137 std::for_each(roarings.cbegin(), roarings.cend(),
+
+ 1139 const std::pair<const uint32_t, Roaring> &map_entry) {
+
+ 1141 std::memcpy(buf, &map_entry.first, sizeof(uint32_t));
+
+
+
+ 1145 buf += sizeof(uint32_t);
+
+ 1147 buf += map_entry.second.write(buf, portable);
+
+
+
+
+
+
+
+
+ 1168 std::memcpy(&map_size, buf,
sizeof (uint64_t));
+ 1169 buf +=
sizeof (uint64_t);
+ 1170 for (uint64_t lcv = 0; lcv < map_size; lcv++) {
+
+
+ 1173 std::memcpy(&key, buf,
sizeof (uint32_t));
+
+
+ 1176 buf +=
sizeof (uint32_t);
+
+
+
+
+ 1181 result.emplaceOrInsert(key, std::move(read_var));
+
+
+
+
+
+ 1194 if (maxbytes <
sizeof (uint64_t)) {
+
+
+
+
+ 1199 std::memcpy(&map_size, buf,
sizeof (uint64_t));
+ 1200 buf +=
sizeof (uint64_t);
+ 1201 maxbytes -=
sizeof (uint64_t);
+ 1202 for (uint64_t lcv = 0; lcv < map_size; lcv++) {
+ 1203 if (maxbytes <
sizeof (uint32_t)) {
+
+
+
+ 1207 std::memcpy(&key, buf,
sizeof (uint32_t));
+
+
+ 1210 buf +=
sizeof (uint32_t);
+ 1211 maxbytes -=
sizeof (uint32_t);
+
+
+
+
+
+
+ 1218 result.emplaceOrInsert(key, std::move(read_var));
+
+
+
+
+
+
+
+ 1233 return std::accumulate(
+ 1234 roarings.cbegin(), roarings.cend(),
+ 1235 sizeof (uint64_t) + roarings.size() *
sizeof (uint32_t),
+ 1236 [=](
size_t previous,
+ 1237 const std::pair<const uint32_t, Roaring> &map_entry) {
+
+ 1239 return previous + map_entry.second.getSizeInBytes(portable);
+
+
+
+
+
+ 1245 const size_t metadata_size =
sizeof (size_t) +
sizeof (uint32_t);
-
-
- 1249 const size_t metadata_size =
sizeof (size_t) +
sizeof (uint32_t);
-
-
-
-
-
- 1255 memcpy(&map_size, buf,
sizeof (uint64_t));
- 1256 buf +=
sizeof (uint64_t);
+
+
+
+
+ 1251 memcpy(&map_size, buf,
sizeof (uint64_t));
+ 1252 buf +=
sizeof (uint64_t);
+
+ 1254 for (uint64_t lcv = 0; lcv < map_size; lcv++) {
+
+ 1256 while (((uintptr_t)buf + metadata_size) % 32 != 0) buf++;
- 1258 for (uint64_t lcv = 0; lcv < map_size; lcv++) {
-
- 1260 while (((uintptr_t)buf + metadata_size) % 32 != 0) buf++;
-
-
-
- 1264 memcpy(&len, buf,
sizeof (
size_t ));
- 1265 buf +=
sizeof (size_t);
-
-
-
- 1269 memcpy(&key, buf,
sizeof (uint32_t));
- 1270 buf +=
sizeof (uint32_t);
+
+
+ 1260 memcpy(&len, buf,
sizeof (
size_t ));
+ 1261 buf +=
sizeof (size_t);
+
+
+
+ 1265 memcpy(&key, buf,
sizeof (uint32_t));
+ 1266 buf +=
sizeof (uint32_t);
+
+
+
+ 1270 result.emplaceOrInsert(key,
read );
-
-
- 1274 result.emplaceOrInsert(key,
read );
-
-
-
-
-
-
-
-
-
-
-
- 1286 std::memcpy(&map_size, buf,
sizeof (uint64_t));
- 1287 buf +=
sizeof (uint64_t);
- 1288 for (uint64_t lcv = 0; lcv < map_size; lcv++) {
-
-
- 1291 std::memcpy(&key, buf,
sizeof (uint32_t));
- 1292 buf +=
sizeof (uint32_t);
-
-
-
-
- 1297 result.emplaceOrInsert(key, std::move(read_var));
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1313 const size_t metadata_size =
sizeof (size_t) +
sizeof (uint32_t);
-
-
- 1316 uint64_t map_size = roarings.size();
- 1317 memcpy(buf, &map_size,
sizeof (uint64_t));
- 1318 buf +=
sizeof (uint64_t);
-
- 1320 for (
auto &map_entry : roarings) {
- 1321 size_t frozenSizeInBytes = map_entry.second.getFrozenSizeInBytes();
-
-
- 1324 while (((uintptr_t)buf + metadata_size) % 32 != 0) buf++;
+
+
+
+
+
+
+
+
+
+
+ 1282 std::memcpy(&map_size, buf,
sizeof (uint64_t));
+ 1283 buf +=
sizeof (uint64_t);
+ 1284 for (uint64_t lcv = 0; lcv < map_size; lcv++) {
+
+
+ 1287 std::memcpy(&key, buf,
sizeof (uint32_t));
+ 1288 buf +=
sizeof (uint32_t);
+
+
+
+
+ 1293 result.emplaceOrInsert(key, std::move(read_var));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1309 const size_t metadata_size =
sizeof (size_t) +
sizeof (uint32_t);
+
+
+ 1312 uint64_t map_size = roarings.size();
+ 1313 memcpy(buf, &map_size,
sizeof (uint64_t));
+ 1314 buf +=
sizeof (uint64_t);
+
+ 1316 for (
auto &map_entry : roarings) {
+ 1317 size_t frozenSizeInBytes = map_entry.second.getFrozenSizeInBytes();
+
+
+ 1320 while (((uintptr_t)buf + metadata_size) % 32 != 0) buf++;
+
+
+ 1323 memcpy(buf, &frozenSizeInBytes,
sizeof (
size_t ));
+ 1324 buf +=
sizeof (size_t);
-
- 1327 memcpy(buf, &frozenSizeInBytes,
sizeof (
size_t ));
- 1328 buf +=
sizeof (size_t);
+
+ 1327 memcpy(buf, &map_entry.first,
sizeof (uint32_t));
+ 1328 buf +=
sizeof (uint32_t);
-
- 1331 memcpy(buf, &map_entry.first,
sizeof (uint32_t));
- 1332 buf +=
sizeof (uint32_t);
-
-
- 1335 map_entry.second.writeFrozen(buf);
- 1336 buf += map_entry.second.getFrozenSizeInBytes();
-
-
-
-
-
- 1342 const size_t metadata_size =
sizeof (size_t) +
sizeof (uint32_t);
-
-
-
- 1346 ret +=
sizeof (uint64_t);
-
- 1348 for (
auto &map_entry : roarings) {
-
- 1350 while ((ret + metadata_size) % 32 != 0) ret++;
- 1351 ret += metadata_size;
-
-
- 1354 ret += map_entry.second.getFrozenSizeInBytes();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1400 if (copyOnWrite == val)
return ;
-
- 1402 std::for_each(roarings.begin(), roarings.end(),
- 1403 [=](std::pair<const uint32_t, Roaring> &map_entry) {
- 1404 map_entry.second.setCopyOnWrite(val);
-
-
-
-
- 1413 auto sink = [](
const std::string &s) { fputs(s.c_str(), stdout); };
-
-
-
-
-
-
- 1423 auto sink = [&result](
const std::string &s) { result += s; };
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1457 roarings_t::const_iterator iterator;
- 1458 roarings_t::const_iterator
end ;
-
-
-
- 1462 auto pq_comp = [](
const pq_entry &lhs,
const pq_entry &rhs) {
- 1463 auto left_key = lhs.iterator->first;
- 1464 auto right_key = rhs.iterator->first;
-
-
-
-
- 1469 return left_key > right_key;
-
-
-
- 1473 std::priority_queue<pq_entry, std::vector<pq_entry>, decltype(pq_comp)>
-
- 1475 for (
size_t i = 0; i < n; ++i) {
- 1476 const auto &roarings = inputs[i]->roarings;
- 1477 if (roarings.begin() != roarings.end()) {
- 1478 pq.push({roarings.begin(), roarings.end()});
-
-
+
+ 1331 map_entry.second.writeFrozen(buf);
+ 1332 buf += map_entry.second.getFrozenSizeInBytes();
+
+
+
+
+
+ 1338 const size_t metadata_size =
sizeof (size_t) +
sizeof (uint32_t);
+
+
+
+ 1342 ret +=
sizeof (uint64_t);
+
+ 1344 for (
auto &map_entry : roarings) {
+
+ 1346 while ((ret + metadata_size) % 32 != 0) ret++;
+ 1347 ret += metadata_size;
+
+
+ 1350 ret += map_entry.second.getFrozenSizeInBytes();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1396 if (copyOnWrite == val)
return ;
+
+ 1398 std::for_each(roarings.begin(), roarings.end(),
+ 1399 [=](std::pair<const uint32_t, Roaring> &map_entry) {
+ 1400 map_entry.second.setCopyOnWrite(val);
+
+
+
+
+ 1409 auto sink = [](
const std::string &s) { fputs(s.c_str(), stdout); };
+
+
+
+
+
+
+ 1419 auto sink = [&result](
const std::string &s) { result += s; };
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1453 roarings_t::const_iterator iterator;
+ 1454 roarings_t::const_iterator
end ;
+
+
+
+ 1458 auto pq_comp = [](
const pq_entry &lhs,
const pq_entry &rhs) {
+ 1459 auto left_key = lhs.iterator->first;
+ 1460 auto right_key = rhs.iterator->first;
+
+
+
+
+ 1465 return left_key > right_key;
+
+
+
+ 1469 std::priority_queue<pq_entry, std::vector<pq_entry>, decltype(pq_comp)>
+
+ 1471 for (
size_t i = 0; i < n; ++i) {
+ 1472 const auto &roarings = inputs[i]->roarings;
+ 1473 if (roarings.begin() != roarings.end()) {
+ 1474 pq.push({roarings.begin(), roarings.end()});
+
+
+
+
+
+ 1480 std::vector<const roaring_bitmap_t *> group_bitmaps;
-
-
- 1484 std::vector<const roaring_bitmap_t *> group_bitmaps;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1502 while (!pq.empty()) {
-
- 1504 auto group_key = pq.top().iterator->first;
-
-
-
-
-
-
- 1511 group_bitmaps.
clear ();
- 1512 while (!pq.empty()) {
- 1513 auto candidate_current_iter = pq.top().iterator;
- 1514 auto candidate_end_iter = pq.top().end;
-
- 1516 auto candidate_key = candidate_current_iter->first;
- 1517 const auto &candidate_bitmap = candidate_current_iter->second;
-
-
-
-
-
-
- 1524 if (candidate_key != group_key) {
-
-
-
-
-
-
-
-
- 1533 group_bitmaps.push_back(&candidate_bitmap.roaring);
-
-
-
-
-
-
-
-
- 1542 ++candidate_current_iter;
- 1543 if (candidate_current_iter != candidate_end_iter) {
- 1544 pq.push({candidate_current_iter, candidate_end_iter});
-
-
-
-
-
- 1550 group_bitmaps.data());
-
-
- 1553 result.roarings.insert(
- 1554 result.roarings.end(),
- 1555 std::make_pair(group_key,
Roaring (inner_result)));
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1583 typedef std::map<uint32_t, Roaring> roarings_t;
- 1584 roarings_t roarings{};
-
- 1586 bool copyOnWrite{
false };
- 1587 static constexpr uint32_t highBytes(
const uint64_t in) {
- 1588 return uint32_t(in >> 32);
-
- 1590 static constexpr uint32_t lowBytes(
const uint64_t in) {
- 1591 return uint32_t(in);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1498 while (!pq.empty()) {
+
+ 1500 auto group_key = pq.top().iterator->first;
+
+
+
+
+
+
+ 1507 group_bitmaps.
clear ();
+ 1508 while (!pq.empty()) {
+ 1509 auto candidate_current_iter = pq.top().iterator;
+ 1510 auto candidate_end_iter = pq.top().end;
+
+ 1512 auto candidate_key = candidate_current_iter->first;
+ 1513 const auto &candidate_bitmap = candidate_current_iter->second;
+
+
+
+
+
+
+ 1520 if (candidate_key != group_key) {
+
+
+
+
+
+
+
+
+ 1529 group_bitmaps.push_back(&candidate_bitmap.roaring);
+
+
+
+
+
+
+
+
+ 1538 ++candidate_current_iter;
+ 1539 if (candidate_current_iter != candidate_end_iter) {
+ 1540 pq.push({candidate_current_iter, candidate_end_iter});
+
+
+
+
+
+ 1546 group_bitmaps.data());
+
+
+ 1549 result.roarings.insert(
+ 1550 result.roarings.end(),
+ 1551 std::make_pair(group_key,
Roaring (inner_result)));
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1579 typedef std::map<uint32_t, Roaring> roarings_t;
+ 1580 roarings_t roarings{};
+
+ 1582 bool copyOnWrite{
false };
+ 1583 static constexpr uint32_t highBytes(
const uint64_t in) {
+ 1584 return uint32_t(in >> 32);
+
+ 1586 static constexpr uint32_t lowBytes(
const uint64_t in) {
+ 1587 return uint32_t(in);
+
+ 1589 static constexpr uint64_t uniteBytes(
const uint32_t highBytes,
+ 1590 const uint32_t lowBytes) {
+ 1591 return (uint64_t(highBytes) << 32) | uint64_t(lowBytes);
- 1593 static constexpr uint64_t uniteBytes(
const uint32_t highBytes,
- 1594 const uint32_t lowBytes) {
- 1595 return (uint64_t(highBytes) << 32) | uint64_t(lowBytes);
-
-
-
- 1599 void emplaceOrInsert(
const uint32_t key,
const Roaring &value) {
- 1600 #if defined(__GLIBCXX__) && __GLIBCXX__ < 20130322
- 1601 roarings.insert(std::make_pair(key, value));
-
- 1603 roarings.emplace(std::make_pair(key, value));
-
-
-
- 1607 void emplaceOrInsert(
const uint32_t key, Roaring &&value) {
- 1608 #if defined(__GLIBCXX__) && __GLIBCXX__ < 20130322
- 1609 roarings.insert(std::make_pair(key, std::move(value)));
-
- 1611 roarings.emplace(key, std::move(value));
-
-
-
-
-
-
-
-
- 1620 Roaring &lookupOrCreateInner(uint32_t key) {
- 1621 auto &bitmap = roarings[key];
- 1622 bitmap.setCopyOnWrite(copyOnWrite);
-
-
-
-
- 1630 const std::function<
void (
const std::string &)> &sink)
const {
-
-
-
-
-
- 1636 const char *separator =
"" ;
-
- 1638 std::string callback_string;
- 1639 for (
const auto &entry : roarings) {
- 1640 auto high_bits = entry.first;
- 1641 const auto &bitmap = entry.second;
- 1642 for (
const auto low_bits : bitmap) {
- 1643 auto value = uniteBytes(high_bits, low_bits);
- 1644 snprintf(buffer,
sizeof (buffer),
"%" PRIu64, value);
- 1645 callback_string = separator;
- 1646 callback_string.append(buffer);
- 1647 sink(callback_string);
-
-
-
-
-
-
- 1660 roarings_t::iterator ensureRangePopulated(uint32_t start_high,
- 1661 uint32_t end_high) {
- 1662 if (start_high > end_high) {
-
-
-
-
- 1667 auto next_populated_iter = roarings.lower_bound(start_high);
-
-
- 1670 roarings_t::iterator start_iter{};
- 1671 for (uint64_t slot = start_high; slot <= end_high; ++slot) {
- 1672 roarings_t::iterator slot_iter;
- 1673 if (next_populated_iter != roarings.end() &&
- 1674 next_populated_iter->first == slot) {
-
-
- 1677 slot_iter = next_populated_iter++;
-
-
-
-
-
-
- 1684 slot_iter = roarings.emplace_hint(
- 1685 next_populated_iter, std::piecewise_construct,
- 1686 std::forward_as_tuple(uint32_t(slot)),
- 1687 std::forward_as_tuple());
- 1688 auto &bitmap = slot_iter->second;
- 1689 bitmap.setCopyOnWrite(copyOnWrite);
-
-
-
-
- 1694 if (slot == start_high) {
- 1695 start_iter = slot_iter;
-
-
-
-
-
- 1705 void eraseIfEmpty(roarings_t::iterator iter) {
- 1706 const auto &bitmap = iter->second;
- 1707 if (bitmap.isEmpty()) {
- 1708 roarings.erase(iter);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1726 bool exhausted =
false )
- 1727 : p(&parent.roarings) {
- 1728 if (exhausted || parent.roarings.empty()) {
- 1729 map_iter = p->cend();
-
- 1731 map_iter = parent.roarings.cbegin();
-
- 1733 while (!i.has_value) {
-
- 1735 if (map_iter == p->cend())
return ;
-
-
-
-
-
-
- 1745 return Roaring64Map::uniteBytes(map_iter->first, i.current_value);
-
-
-
- 1749 if (map_iter == p->cend())
return false ;
- 1750 if (o.map_iter == o.p->cend())
return true ;
-
-
-
-
- 1755 if (o.map_iter == o.p->cend())
return true ;
- 1756 if (map_iter == p->cend())
return false ;
- 1757 return **
this <= *o;
-
-
-
- 1761 if (o.map_iter == o.p->cend())
return false ;
- 1762 if (map_iter == p->cend())
return true ;
-
-
-
-
- 1767 if (map_iter == p->cend())
return true ;
- 1768 if (o.map_iter == o.p->cend())
return false ;
- 1769 return **
this >= *o;
-
-
-
-
- 1774 while (!i.has_value) {
-
- 1776 if (map_iter == p->cend())
return *
this ;
-
-
-
-
-
-
-
-
- 1785 while (!i.has_value) {
-
- 1787 if (map_iter == p->cend())
return orig;
-
-
-
-
-
-
- 1794 map_iter = p->lower_bound(Roaring64Map::highBytes(x));
- 1795 if (map_iter != p->cend()) {
-
- 1797 if (map_iter->first == Roaring64Map::highBytes(x)) {
-
- 1799 &i, Roaring64Map::lowBytes(x)))
-
-
- 1802 if (map_iter == p->cend())
return false ;
-
-
-
-
-
-
-
-
- 1811 if (map_iter == p->cend()) {
-
-
- 1814 if (i.has_value)
return *
this ;
-
+
+
+ 1595 void emplaceOrInsert(
const uint32_t key,
const Roaring &value) {
+ 1596 #if defined(__GLIBCXX__) && __GLIBCXX__ < 20130322
+ 1597 roarings.insert(std::make_pair(key, value));
+
+ 1599 roarings.emplace(std::make_pair(key, value));
+
+
+
+ 1603 void emplaceOrInsert(
const uint32_t key, Roaring &&value) {
+ 1604 #if defined(__GLIBCXX__) && __GLIBCXX__ < 20130322
+ 1605 roarings.insert(std::make_pair(key, std::move(value)));
+
+ 1607 roarings.emplace(key, std::move(value));
+
+
+
+
+
+
+
+
+ 1616 Roaring &lookupOrCreateInner(uint32_t key) {
+ 1617 auto &bitmap = roarings[key];
+ 1618 bitmap.setCopyOnWrite(copyOnWrite);
+
+
+
+
+ 1626 const std::function<
void (
const std::string &)> &sink)
const {
+
+
+
+
+
+ 1632 const char *separator =
"" ;
+
+ 1634 std::string callback_string;
+ 1635 for (
const auto &entry : roarings) {
+ 1636 auto high_bits = entry.first;
+ 1637 const auto &bitmap = entry.second;
+ 1638 for (
const auto low_bits : bitmap) {
+ 1639 auto value = uniteBytes(high_bits, low_bits);
+ 1640 snprintf(buffer,
sizeof (buffer),
"%" PRIu64, value);
+ 1641 callback_string = separator;
+ 1642 callback_string.append(buffer);
+ 1643 sink(callback_string);
+
+
+
+
+
+
+ 1656 roarings_t::iterator ensureRangePopulated(uint32_t start_high,
+ 1657 uint32_t end_high) {
+ 1658 if (start_high > end_high) {
+
+
+
+
+ 1663 auto next_populated_iter = roarings.lower_bound(start_high);
+
+
+ 1666 roarings_t::iterator start_iter{};
+ 1667 for (uint64_t slot = start_high; slot <= end_high; ++slot) {
+ 1668 roarings_t::iterator slot_iter;
+ 1669 if (next_populated_iter != roarings.end() &&
+ 1670 next_populated_iter->first == slot) {
+
+
+ 1673 slot_iter = next_populated_iter++;
+
+
+
+
+
+
+ 1680 slot_iter = roarings.emplace_hint(
+ 1681 next_populated_iter, std::piecewise_construct,
+ 1682 std::forward_as_tuple(uint32_t(slot)),
+ 1683 std::forward_as_tuple());
+ 1684 auto &bitmap = slot_iter->second;
+ 1685 bitmap.setCopyOnWrite(copyOnWrite);
+
+
+
+
+ 1690 if (slot == start_high) {
+ 1691 start_iter = slot_iter;
+
+
+
+
+
+ 1701 void eraseIfEmpty(roarings_t::iterator iter) {
+ 1702 const auto &bitmap = iter->second;
+ 1703 if (bitmap.isEmpty()) {
+ 1704 roarings.erase(iter);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1724 bool exhausted =
false )
+ 1725 : p(&parent.roarings) {
+ 1726 if (exhausted || parent.roarings.empty()) {
+ 1727 map_iter = p->cend();
+
+ 1729 map_iter = parent.roarings.cbegin();
+
+ 1731 while (!i.has_value) {
+
+ 1733 if (map_iter == p->cend())
return ;
+
+
+
+
+
+
+ 1743 return Roaring64Map::uniteBytes(map_iter->first, i.current_value);
+
+
+
+ 1747 if (map_iter == p->cend())
return false ;
+ 1748 if (o.map_iter == o.p->cend())
return true ;
+
+
+
+
+ 1753 if (o.map_iter == o.p->cend())
return true ;
+ 1754 if (map_iter == p->cend())
return false ;
+ 1755 return **
this <= *o;
+
+
+
+ 1759 if (o.map_iter == o.p->cend())
return false ;
+ 1760 if (map_iter == p->cend())
return true ;
+
+
+
+
+ 1765 if (map_iter == p->cend())
return true ;
+ 1766 if (o.map_iter == o.p->cend())
return false ;
+ 1767 return **
this >= *o;
+
+
+
+
+ 1772 while (!i.has_value) {
+
+ 1774 if (map_iter == p->cend())
return *
this ;
+
+
+
+
+
+
+
+
+ 1783 while (!i.has_value) {
+
+ 1785 if (map_iter == p->cend())
return orig;
+
+
+
+
+
+
+ 1796 map_iter = p->lower_bound(Roaring64Map::highBytes(x));
+ 1797 if (map_iter != p->cend()) {
+
+ 1799 if (map_iter->first == Roaring64Map::highBytes(x)) {
+
+ 1801 &i, Roaring64Map::lowBytes(x)))
+
+
+ 1804 if (map_iter == p->cend())
return false ;
+
+
+
+
+
+
+
+
+
+
-
- 1818 while (!i.has_value) {
- 1819 if (map_iter == p->cbegin())
return *
this ;
-
-
+
+ 1818 if (map_iter == p->cend()) {
+
+
+ 1821 if (i.has_value)
return *
this ;
-
-
-
-
-
- 1828 if (map_iter == p->cend()) {
-
-
-
-
-
-
- 1835 while (!i.has_value) {
- 1836 if (map_iter == p->cbegin())
return orig;
-
-
+
+
+ 1825 while (!i.has_value) {
+ 1826 if (map_iter == p->cbegin())
return *
this ;
+
+
+
+
+
+
+
+
+ 1835 if (map_iter == p->cend()) {
+
+
+
-
-
-
-
- 1844 if (map_iter == p->cend() && o.map_iter == o.p->cend())
return true ;
- 1845 if (o.map_iter == o.p->cend())
return false ;
- 1846 return **
this == *o;
-
-
-
- 1850 if (map_iter == p->cend() && o.map_iter == o.p->cend())
return false ;
- 1851 if (o.map_iter == o.p->cend())
return true ;
- 1852 return **
this != *o;
-
-
-
- 1856 const std::map<uint32_t, Roaring> *p{
nullptr };
- 1857 std::map<uint32_t, Roaring>::const_iterator
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-type_of_iterator operator++(int)
-bool operator<(const type_of_iterator &o) const
-type_of_iterator & operator--()
-bool operator<=(const type_of_iterator &o) const
-bool operator!=(const Roaring64MapSetBitBiDirectionalIterator &o) const
-Roaring64MapSetBitBiDirectionalIterator(const Roaring64Map &parent, bool exhausted=false)
-
-bool operator>(const type_of_iterator &o) const
-bool move(const value_type &x)
-value_type operator*() const
-std::bidirectional_iterator_tag iterator_category
-
-type_of_iterator operator--(int)
-bool operator==(const Roaring64MapSetBitBiDirectionalIterator &o) const
-
-Roaring64MapSetBitBiDirectionalIterator type_of_iterator
-bool operator>=(const type_of_iterator &o) const
-type_of_iterator & operator++()
-
+
+
+ 1842 while (!i.has_value) {
+ 1843 if (map_iter == p->cbegin())
return orig;
+
+
+
+
+
+
+
+ 1851 if (map_iter == p->cend() && o.map_iter == o.p->cend())
return true ;
+ 1852 if (o.map_iter == o.p->cend())
return false ;
+ 1853 return **
this == *o;
+
+
+
+ 1857 if (map_iter == p->cend() && o.map_iter == o.p->cend())
return false ;
+ 1858 if (o.map_iter == o.p->cend())
return true ;
+ 1859 return **
this != *o;
+
+
+
+ 1863 const std::map<uint32_t, Roaring> *p{
nullptr };
+ 1864 std::map<uint32_t, Roaring>::const_iterator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+type_of_iterator operator++(int)
+bool operator<(const type_of_iterator &o) const
+type_of_iterator & operator--()
+bool operator<=(const type_of_iterator &o) const
+bool operator!=(const Roaring64MapSetBitBiDirectionalIterator &o) const
+Roaring64MapSetBitBiDirectionalIterator(const Roaring64Map &parent, bool exhausted=false)
+
+bool operator>(const type_of_iterator &o) const
+CROARING_DEPRECATED bool move(const value_type &x)
+value_type operator*() const
+std::bidirectional_iterator_tag iterator_category
+
+type_of_iterator operator--(int)
+bool operator==(const Roaring64MapSetBitBiDirectionalIterator &o) const
+
+Roaring64MapSetBitBiDirectionalIterator type_of_iterator
+bool operator>=(const type_of_iterator &o) const
+bool move_equalorlarger(const value_type &x)
+type_of_iterator & operator++()
+
void addMany(size_t n_args, const uint32_t *vals)
-bool removeRunCompression()
-void flip(uint64_t min, uint64_t max)
-friend class Roaring64MapSetBitBiDirectionalIterator
+bool removeRunCompression()
+void flip(uint64_t min, uint64_t max)
+friend class Roaring64MapSetBitBiDirectionalIterator
Roaring64Map(size_t n, const uint64_t *data)
-uint64_t rank(uint64_t x) const
-size_t getFrozenSizeInBytes() const
-Roaring64Map operator-(const Roaring64Map &o) const
-
-void flipClosed(uint32_t min, uint32_t max)
+uint64_t rank(uint64_t x) const
+size_t getFrozenSizeInBytes() const
+Roaring64Map operator-(const Roaring64Map &o) const
+
+void flipClosed(uint32_t min, uint32_t max)
bool contains(uint32_t x) const
-uint64_t cardinality() const
-const_iterator end() const
+uint64_t cardinality() const
+const_iterator end() const
bool contains(uint64_t x) const
Roaring64Map(size_t n, const uint32_t *data)
-Roaring64Map & operator|=(const Roaring64Map &other)
+Roaring64Map & operator|=(const Roaring64Map &other)
Roaring64Map & operator=(std::initializer_list< uint64_t > l)
-Roaring64Map & operator&=(const Roaring64Map &other)
-std::string toString() const
+Roaring64Map & operator&=(const Roaring64Map &other)
+std::string toString() const
Roaring64Map(const Roaring &r)
Roaring64Map & operator=(const Roaring64Map &r)=default
-Roaring64MapSetBitBiDirectionalIterator const_iterator
-bool operator==(const Roaring64Map &r) const
+Roaring64MapSetBitBiDirectionalIterator const_iterator
+bool operator==(const Roaring64Map &r) const
-bool isSubset(const Roaring64Map &r) const
-const_iterator begin() const
-size_t write(char *buf, bool portable=true) const
+bool isSubset(const Roaring64Map &r) const
+const_iterator begin() const
+size_t write(char *buf, bool portable=true) const
void removeRangeClosed(uint64_t min, uint64_t max)
-
+
bool removeChecked(uint32_t x)
-Roaring64Map operator|(const Roaring64Map &o) const
+Roaring64Map operator|(const Roaring64Map &o) const
bool addChecked(uint64_t x)
void addRangeClosed(uint64_t min, uint64_t max)
-bool getCopyOnWrite() const
+bool getCopyOnWrite() const
Roaring64Map(Roaring &&r)
-static Roaring64Map readSafe(const char *buf, size_t maxbytes)
+static Roaring64Map readSafe(const char *buf, size_t maxbytes)
-static Roaring64Map fastunion(size_t n, const Roaring64Map **inputs)
-Roaring64Map & operator^=(const Roaring64Map &other)
-
+static Roaring64Map fastunion(size_t n, const Roaring64Map **inputs)
+Roaring64Map & operator^=(const Roaring64Map &other)
+
Roaring64Map(const Roaring64Map &r)=default
-Roaring64Map operator^(const Roaring64Map &o) const
-static const Roaring64Map frozenView(const char *buf)
-static Roaring64Map read(const char *buf, bool portable=true)
+Roaring64Map operator^(const Roaring64Map &o) const
+static const Roaring64Map frozenView(const char *buf)
+static Roaring64Map read(const char *buf, bool portable=true)
void addMany(size_t n_args, const uint64_t *vals)
static Roaring64Map bitmapOfList(std::initializer_list< uint64_t > l)
void addRange(uint64_t min, uint64_t max)
-Roaring64Map operator&(const Roaring64Map &o) const
+Roaring64Map operator&(const Roaring64Map &o) const
static Roaring64Map bitmapOf(size_t n...)
bool removeChecked(uint64_t x)
Roaring64Map(roaring_bitmap_t *s)
-Roaring64Map & operator-=(const Roaring64Map &other)
-Roaring64MapSetBitBiDirectionalIterator const_bidirectional_iterator
-void setCopyOnWrite(bool val)
+Roaring64Map & operator-=(const Roaring64Map &other)
+Roaring64MapSetBitBiDirectionalIterator const_bidirectional_iterator
+void setCopyOnWrite(bool val)
Roaring64Map(Roaring64Map &&r) noexcept=default
-void flipClosed(uint64_t min, uint64_t max)
-void toUint64Array(uint64_t *ans) const
-static const Roaring64Map portableDeserializeFrozen(const char *buf)
-
-size_t getSizeInBytes(bool portable=true) const
+void flipClosed(uint64_t min, uint64_t max)
+void toUint64Array(uint64_t *ans) const
+static const Roaring64Map portableDeserializeFrozen(const char *buf)
+
+size_t getSizeInBytes(bool portable=true) const
void removeRange(uint64_t min, uint64_t max)
-void iterate(api::roaring_iterator64 iterator, void *ptr) const
+void iterate(api::roaring_iterator64 iterator, void *ptr) const
Roaring64Map & operator=(Roaring64Map &&r) noexcept=default
void removeRangeClosed(uint32_t min, uint32_t max)
-void swap(Roaring64Map &r)
+void swap(Roaring64Map &r)
void addRangeClosed(uint32_t min, uint32_t max)
-
-bool select(uint64_t rank, uint64_t *element) const
-void writeFrozen(char *buf) const
+
+bool select(uint64_t rank, uint64_t *element) const
+void writeFrozen(char *buf) const
Roaring64Map(std::initializer_list< uint64_t > l)
-bool isStrictSubset(const Roaring64Map &r) const
+bool isStrictSubset(const Roaring64Map &r) const
bool addChecked(uint32_t x)
-int64_t getIndex(uint64_t x) const
-
-static Roaring readSafe(const char *buf, size_t maxbytes)
-bool addChecked(uint32_t x) noexcept
-void addRangeClosed(const uint32_t min, const uint32_t max) noexcept
-static Roaring read(const char *buf, bool portable=true)
-void add(uint32_t x) noexcept
-void addBulk(BulkContext &context, uint32_t x) noexcept
-void addMany(size_t n_args, const uint32_t *vals) noexcept
-static const Roaring frozenView(const char *buf, size_t length)
-static const Roaring portableDeserializeFrozen(const char *buf)
-size_t getSizeInBytes(bool portable=true) const noexcept
-
+int64_t getIndex(uint64_t x) const
+
+static Roaring readSafe(const char *buf, size_t maxbytes)
+bool addChecked(uint32_t x) noexcept
+void addRangeClosed(const uint32_t min, const uint32_t max) noexcept
+static Roaring read(const char *buf, bool portable=true)
+void add(uint32_t x) noexcept
+void addBulk(BulkContext &context, uint32_t x) noexcept
+void addMany(size_t n_args, const uint32_t *vals) noexcept
+static const Roaring frozenView(const char *buf, size_t length)
+static const Roaring portableDeserializeFrozen(const char *buf)
+size_t getSizeInBytes(bool portable=true) const noexcept
+
Roaring64MapSetBitBiDirectionalIterator Roaring64MapSetBitForwardIterator
void roaring_iterator_init_last(const roaring_bitmap_t *r, roaring_uint32_iterator_t *newit)
roaring_bitmap_t * roaring_bitmap_or_many(size_t number, const roaring_bitmap_t **rs)
@@ -1760,7 +1761,7 @@
struct roaring_uint32_iterator_s roaring_uint32_iterator_t
bool roaring_uint32_iterator_advance(roaring_uint32_iterator_t *it)
-#define ROARING_TERMINATE(_s)
+#define ROARING_TERMINATE(_s)
diff --git a/db/d6e/roaring_8hh.html b/db/d6e/roaring_8hh.html
index 3971c2c53..709f8be0b 100644
--- a/db/d6e/roaring_8hh.html
+++ b/db/d6e/roaring_8hh.html
@@ -89,7 +89,8 @@
+