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

Method andNotBitmap

arraycontainer.go:780–791  ·  view source on GitHub ↗
(value2 *bitmapContainer)

Source from the content-addressed store, hash-verified

778}
779
780func (ac *arrayContainer) andNotBitmap(value2 *bitmapContainer) container {
781 desiredcapacity := ac.getCardinality()
782 answer := newArrayContainerCapacity(desiredcapacity)
783 answer.content = answer.content[:desiredcapacity]
784 pos := 0
785 for _, v := range ac.content {
786 answer.content[pos] = v
787 pos += 1 - int(value2.bitValue(v))
788 }
789 answer.content = answer.content[:pos]
790 return answer
791}
792
793func (ac *arrayContainer) andBitmap(value2 *bitmapContainer) container {
794 desiredcapacity := ac.getCardinality()

Callers 2

andNotMethod · 0.95
andNotRun16Method · 0.45

Calls 3

getCardinalityMethod · 0.95
bitValueMethod · 0.80

Tested by

no test coverage detected