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

Function canMerge16

runcontainer.go:301–306  ·  view source on GitHub ↗

canMerge returns true iff the intervals a and b either overlap or they are contiguous and so can be merged into a single interval.

(a, b interval16)

Source from the content-addressed store, hash-verified

299// contiguous and so can be merged into
300// a single interval.
301func canMerge16(a, b interval16) bool {
302 if int(a.last())+1 < int(b.start) {
303 return false
304 }
305 return int(b.last())+1 >= int(a.start)
306}
307
308// haveOverlap differs from canMerge in that
309// it tells you if the intersection of a

Callers 4

TestRleInterval16sFunction · 0.85
mergeInterval16sFunction · 0.85
unionMethod · 0.85
unionCardinalityMethod · 0.85

Calls 1

lastMethod · 0.80

Tested by 1

TestRleInterval16sFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…