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

Method removeKey

runcontainer.go:1328–1337  ·  view source on GitHub ↗

remove removes key from the container.

(key uint16)

Source from the content-addressed store, hash-verified

1326
1327// remove removes key from the container.
1328func (rc *runContainer16) removeKey(key uint16) (wasPresent bool) {
1329 var index int
1330 index, wasPresent, _ = rc.search(int(key))
1331 if !wasPresent {
1332 return // already removed, nothing to do.
1333 }
1334 pos := key - rc.iv[index].start
1335 rc.deleteAt(&index, &pos)
1336 return
1337}
1338
1339// internal helper functions
1340

Callers 5

iremoveMethod · 0.95
TestRleRandomUnion16Function · 0.80
TestRleStoringMax16Function · 0.80

Calls 2

searchMethod · 0.95
deleteAtMethod · 0.95

Tested by 3

TestRleRandomUnion16Function · 0.64
TestRleStoringMax16Function · 0.64