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

Method remove

roaring64/roaringarray64.go:246–253  ·  view source on GitHub ↗
(key uint32)

Source from the content-addressed store, hash-verified

244}
245
246func (ra *roaringArray64) remove(key uint32) bool {
247 i := ra.binarySearch(0, int64(len(ra.keys)), key)
248 if i >= 0 { // if a new key
249 ra.removeAtIndex(i)
250 return true
251 }
252 return false
253}
254
255func (ra *roaringArray64) removeAtIndex(i int) {
256 copy(ra.keys[i:], ra.keys[i+1:])

Callers

nothing calls this directly

Calls 2

binarySearchMethod · 0.95
removeAtIndexMethod · 0.95

Tested by

no test coverage detected