CRoaring
4.2.1
Roaring bitmaps in C (and C++)
|
#include <roaring.h>
Public Attributes | |
const roaring_bitmap_t * | parent |
const ROARING_CONTAINER_T * | container |
uint8_t | typecode |
int32_t | container_index |
uint32_t | highbits |
roaring_container_iterator_t | container_it |
uint32_t | current_value |
bool | has_value |
What follows is code use to iterate through values in a roaring bitmap
roaring_bitmap_t *r =... roaring_uint32_iterator_t i; roaring_iterator_create(r, &i); while(i.has_value) { printf("value = %d\n", i.current_value); roaring_uint32_iterator_advance(&i); }
Obviously, if you modify the underlying bitmap, the iterator becomes invalid. So don't. A struct used to keep iterator state. Users should only access current_value
and has_value
, the rest of the type should be treated as opaque.
const ROARING_CONTAINER_T* roaring_uint32_iterator_s::container |
roaring_container_iterator_t roaring_uint32_iterator_s::container_it |
const roaring_bitmap_t* roaring_uint32_iterator_s::parent |