Function croaring_sys::roaring64_bitmap_rank

source ยท
pub unsafe extern "C" fn roaring64_bitmap_rank(
    r: *const roaring64_bitmap_t,
    val: u64
) -> u64
Expand description

Returns the number of integers that are smaller or equal to x. Thus if x is the first element, this function will return 1. If x is smaller than the smallest element, this function will return 0.

The indexing convention differs between roaring64_bitmap_select and roaring64_bitmap_rank: roaring_bitmap64_select refers to the smallest value as having index 0, whereas roaring64_bitmap_rank returns 1 when ranking the smallest value.