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

Method andArray

arraycontainer.go:918–927  ·  view source on GitHub ↗
(value2 *arrayContainer)

Source from the content-addressed store, hash-verified

916}
917
918func (ac *arrayContainer) andArray(value2 *arrayContainer) container {
919 desiredcapacity := minOfInt(ac.getCardinality(), value2.getCardinality())
920 answer := newArrayContainerCapacity(desiredcapacity)
921 length := intersection2by2(
922 ac.content,
923 value2.content,
924 answer.content)
925 answer.content = answer.content[:length]
926 return answer
927}
928
929func (ac *arrayContainer) andArrayCardinality(value2 *arrayContainer) int {
930 return intersection2by2Cardinality(

Callers 2

andMethod · 0.95
iandMethod · 0.45

Calls 5

getCardinalityMethod · 0.95
intersection2by2Function · 0.85
minOfIntFunction · 0.70
getCardinalityMethod · 0.65

Tested by

no test coverage detected