mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-07-14 09:32:09 -04:00
Bumps [github.com/blevesearch/bleve/v2](https://github.com/blevesearch/bleve) from 2.5.7 to 2.6.0. - [Release notes](https://github.com/blevesearch/bleve/releases) - [Commits](https://github.com/blevesearch/bleve/compare/v2.5.7...v2.6.0) --- updated-dependencies: - dependency-name: github.com/blevesearch/bleve/v2 dependency-version: 2.6.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
32 lines
724 B
Go
32 lines
724 B
Go
package roaring64
|
|
|
|
import "iter"
|
|
|
|
// Values returns an iterator that yields the elements of the bitmap in
|
|
// increasing order. Starting with Go 1.23, users can use a for loop to iterate
|
|
// over it.
|
|
func Values(b *Bitmap) iter.Seq[uint64] {
|
|
return func(yield func(uint64) bool) {
|
|
it := b.Iterator()
|
|
for it.HasNext() {
|
|
if !yield(it.Next()) {
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// 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.
|
|
func Backward(b *Bitmap) iter.Seq[uint64] {
|
|
return func(yield func(uint64) bool) {
|
|
it := b.ReverseIterator()
|
|
for it.HasNext() {
|
|
if !yield(it.Next()) {
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|