Closed arthurkiller closed 3 years ago
r.setfull means fill all bits with a key.
r.setfull
But after calling r.setfull, not all bits were set. r.statandr.bitcount` shown that we have left 2 bits unset.
and
Bitmap* bitmap = bitmap_from_range(0, UINT32_MAX-1);
roaring can take [0 ~ 2^32-1] , [0 ~ 4294967295] , and UINT32_MAX represent 4294967295, so we should use instead.
UINT32_MAX
4294967295
Bitmap* bitmap = bitmap_from_range(0, UINT32_MAX);
But after this, still got 1 bit left.
roaring_bitmap_from_range(from, to, 1);
roaring_bitmap_from_range will set range for bitset only with a right-open range, those bits between [from, to) will be set.
roaring_bitmap_from_range
so we should do this manually by adding
bitmap_setbit(bitmap, UINT32_MAX, 1);
closed via #86
r.setfull
means fill all bits with a key.But after calling
r.setfull
, not all bits were set. r.statand
r.bitcount` shown that we have left 2 bits unset.roaring can take [0 ~ 2^32-1] , [0 ~ 4294967295] , and
UINT32_MAX
represent4294967295
, so we should use instead.But after this, still got 1 bit left.
roaring_bitmap_from_range
will set range for bitset only with a right-open range, those bits between [from, to) will be set.so we should do this manually by adding