MCPcopy Index your code
hub / github.com/RoaringBitmap/roaring / andNotBitmap

Method andNotBitmap

bitmapcontainer.go:1065–1078  ·  view source on GitHub ↗
(value2 *bitmapContainer)

Source from the content-addressed store, hash-verified

1063}
1064
1065func (bc *bitmapContainer) andNotBitmap(value2 *bitmapContainer) container {
1066 newCardinality := int(popcntMaskSlice(bc.bitmap, value2.bitmap))
1067 if newCardinality > arrayDefaultMaxSize {
1068 answer := newBitmapContainer()
1069 for k := 0; k < len(answer.bitmap); k++ {
1070 answer.bitmap[k] = bc.bitmap[k] &^ value2.bitmap[k]
1071 }
1072 answer.cardinality = newCardinality
1073 return answer
1074 }
1075 ac := newArrayContainerSize(newCardinality)
1076 fillArrayANDNOT(ac.content, bc.bitmap, value2.bitmap)
1077 return ac
1078}
1079
1080func (bc *bitmapContainer) iandNotBitmapSurely(value2 *bitmapContainer) container {
1081 newCardinality := int(popcntMaskSlice(bc.bitmap, value2.bitmap))

Callers 2

andNotMethod · 0.95
andNotRun16Method · 0.95

Calls 4

newBitmapContainerFunction · 0.85
newArrayContainerSizeFunction · 0.85
fillArrayANDNOTFunction · 0.85
popcntMaskSliceFunction · 0.70

Tested by

no test coverage detected