MCPcopy Create free account
hub / github.com/RoaringBitmap/roaring / set

Method set

runcontainer.go:291–295  ·  view source on GitHub ↗

set adds the integers in vals to the set. Vals must be sorted in increasing order; if not, you should set alreadySorted to false, and we will sort them in place for you. (Be aware of this side effect -- it will affect the callers view of vals). If you have a small number of additions to an already

(alreadySorted bool, vals ...uint16)

Source from the content-addressed store, hash-verified

289// If you have a small number of additions to an already
290// big runContainer16, calling Add() may be faster.
291func (rc *runContainer16) set(alreadySorted bool, vals ...uint16) {
292 rc2 := newRunContainer16FromVals(alreadySorted, vals...)
293 un := rc.union(rc2)
294 rc.iv = un.iv
295}
296
297// canMerge returns true iff the intervals
298// a and b either overlap or they are

Callers 3

TestRleRandomUnion16Function · 0.80
TestRleStoringMax16Function · 0.80

Calls 2

unionMethod · 0.95

Tested by 3

TestRleRandomUnion16Function · 0.64
TestRleStoringMax16Function · 0.64