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

Method iandBitmap

arraycontainer.go:606–617  ·  view source on GitHub ↗
(bc *bitmapContainer)

Source from the content-addressed store, hash-verified

604}
605
606func (ac *arrayContainer) iandBitmap(bc *bitmapContainer) container {
607 pos := 0
608 c := ac.getCardinality()
609 for k := 0; k < c; k++ {
610 // branchless
611 v := ac.content[k]
612 ac.content[pos] = v
613 pos += int(bc.bitValue(v))
614 }
615 ac.content = ac.content[:pos]
616 return ac
617}
618
619func (ac *arrayContainer) xor(a container) container {
620 switch x := a.(type) {

Callers 1

iandMethod · 0.95

Calls 2

getCardinalityMethod · 0.95
bitValueMethod · 0.80

Tested by

no test coverage detected