MCPcopy
hub / github.com/RoaringBitmap/roaring / ior

Method ior

bitmapcontainer.go:487–507  ·  view source on GitHub ↗
(a container)

Source from the content-addressed store, hash-verified

485}
486
487func (bc *bitmapContainer) ior(a container) container {
488 switch x := a.(type) {
489 case *arrayContainer:
490 return bc.iorArray(x)
491 case *bitmapContainer:
492 return bc.iorBitmap(x)
493 case *runContainer16:
494 if x.isFull() {
495 return x.clone()
496 }
497 for i := range x.iv {
498 bc.iaddRange(int(x.iv[i].start), int(x.iv[i].last())+1)
499 }
500 if bc.isFull() {
501 return newRunContainer16Range(0, MaxUint16)
502 }
503 // bc.computeCardinality()
504 return bc
505 }
506 panic(fmt.Errorf("unsupported container type %T", a))
507}
508
509func (bc *bitmapContainer) lazyIOR(a container) container {
510 switch x := a.(type) {

Callers

nothing calls this directly

Calls 8

iorArrayMethod · 0.95
iorBitmapMethod · 0.95
iaddRangeMethod · 0.95
isFullMethod · 0.95
newRunContainer16RangeFunction · 0.85
lastMethod · 0.80
isFullMethod · 0.65
cloneMethod · 0.65

Tested by

no test coverage detected