You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (uint32_t i = 100; i < 100000; i+= 1 + (i%5)) {
833
+
assert(bool_array[i]);
834
+
}
835
+
for (uint32_t i = 100000; i < 500000; i+= 100) {
836
+
assert(bool_array[i]);
837
+
}
838
+
839
+
// Check that non-set values are false
840
+
assert(!bool_array[0]); // 0 should not be set
841
+
assert(!bool_array[99]); // 99 should not be set
842
+
843
+
// you must free the memory:
844
+
free(bool_array);
845
+
roaring_bitmap_free(r1);
846
+
```
847
+
848
+
This function stores each bit in a single byte as a boolean value, which can be useful when you need to work with boolean arrays directly. Note that this approach uses more memory than the Roaring bitmap itself, but provides fast random access to individual elements.
0 commit comments