MCPcopy
hub / github.com/RoaringBitmap/roaring / Backward

Function Backward

iter.go:22–31  ·  view source on GitHub ↗

Backward returns an iterator that yields the elements of the bitmap in decreasing order. Starting with Go 1.23, users can use a for loop to iterate over it.

(b *Bitmap)

Source from the content-addressed store, hash-verified

20// decreasing order. Starting with Go 1.23, users can use a for loop to iterate
21// over it.
22func Backward(b *Bitmap) iter.Seq[uint32] {
23 return func(yield func(uint32) bool) {
24 it := b.ReverseIterator()
25 for it.HasNext() {
26 if !yield(it.Next()) {
27 return
28 }
29 }
30 }
31}
32
33// Unset creates an iterator that yields values in the range [min, max] that are NOT contained in the bitmap.
34// The iterator becomes invalid if the bitmap is modified (e.g., with Add or Remove).

Callers 4

TestBackward123Function · 0.70
BenchmarkIterator123Function · 0.70
TestBackwardFunction · 0.70
BenchmarkIteratorAllocFunction · 0.70

Calls 3

HasNextMethod · 0.65
NextMethod · 0.65
ReverseIteratorMethod · 0.45

Tested by 4

TestBackward123Function · 0.56
BenchmarkIterator123Function · 0.56
TestBackwardFunction · 0.56
BenchmarkIteratorAllocFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…