pub unsafe extern "C" fn roaring64_iterator_read_prev_ranges(
it: *mut roaring64_iterator_t,
buf: *mut roaring64_range_closed_t,
count: usize,
) -> usizeExpand description
Reads previous ${count} ranges from iterator into user-supplied ${buf}. A range is defined as a maximal interval of consecutive values. For example, the set {1,2,3,5,6} contains two ranges: [1..3] and [5..6]. Each range is represented as a struct {min,max}, both endpoints included. Consecutive values that span internal container boundaries are merged into a single range.
Returns the number of read ranges. This number can be smaller than ${count}, which means that the iterator is drained.
Ranges are returned in reverse order, e.g. the first range returned is the highest range (ending at the current value).
This function can be used together with other iterator functions.
- first range will end with the current iterator value
- after the function returns, the iterator is positioned at the element before the beginning of the last returned range, or has_value is false if the bitmap is exhausted.