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

Method orArray

runcontainer.go:2237–2247  ·  view source on GitHub ↗

orArray finds the union of rc and ac.

(ac *arrayContainer)

Source from the content-addressed store, hash-verified

2235
2236// orArray finds the union of rc and ac.
2237func (rc *runContainer16) orArray(ac *arrayContainer) container {
2238 if ac.isEmpty() {
2239 return rc.clone()
2240 }
2241 if rc.isEmpty() {
2242 return ac.clone()
2243 }
2244 intervals, cardminusone := runArrayUnionToRuns(rc, ac)
2245 result := newRunContainer16TakeOwnership(intervals)
2246 return result.toEfficientContainerFromCardinality(int(cardminusone) + 1)
2247}
2248
2249// orArray finds the union of rc and ac.
2250func (rc *runContainer16) orArrayCardinality(ac *arrayContainer) int {

Callers 1

orMethod · 0.95

Calls 7

cloneMethod · 0.95
isEmptyMethod · 0.95
runArrayUnionToRunsFunction · 0.85
isEmptyMethod · 0.65
cloneMethod · 0.65

Tested by

no test coverage detected