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

Method search

runcontainer.go:936–938  ·  view source on GitHub ↗

search returns alreadyPresent to indicate if the key is already in one of our interval16s. If key is alreadyPresent, then whichInterval16 tells you where. If key is not already present, then whichInterval16 is set as follows: a) whichInterval16 == len(rc.iv)-1 if key is beyond our last inter

(key int)

Source from the content-addressed store, hash-verified

934//
935// runContainer16.search always returns whichInterval16 < len(rc.iv).
936func (rc *runContainer16) search(key int) (whichInterval16 int, alreadyPresent bool, numCompares int) {
937 return rc.searchRange(key, 0, 0)
938}
939
940// getCardinality returns the count of the integers stored in the
941// runContainer16. The running complexity depends on the size

Callers 10

containsMethod · 0.95
AddMethod · 0.95
removeKeyMethod · 0.95
isubtractMethod · 0.95
rankMethod · 0.95
getCardinalityInRangeMethod · 0.95
nextValueMethod · 0.95
nextAbsentValueMethod · 0.95
previousValueMethod · 0.95
previousAbsentValueMethod · 0.95

Calls 1

searchRangeMethod · 0.95

Tested by

no test coverage detected