MCPcopy Create free account
hub / github.com/RoaringBitmap/roaring / and

Method and

runcontainer.go:1826–1843  ·  view source on GitHub ↗
(a container)

Source from the content-addressed store, hash-verified

1824}
1825
1826func (rc *runContainer16) and(a container) container {
1827 if rc.isFull() {
1828 return a.clone()
1829 }
1830 switch c := a.(type) {
1831 case *runContainer16:
1832 // Important: there is no reason to believe that the
1833 // result of intersecting two run containers is itself
1834 // a run container. Hence we convert to efficient container.
1835 // We only use run containers when they are efficient.
1836 return rc.intersect(c).toEfficientContainer()
1837 case *arrayContainer:
1838 return rc.andArray(c)
1839 case *bitmapContainer:
1840 return rc.andBitmapContainer(c)
1841 }
1842 panic("unsupported container type")
1843}
1844
1845func (rc *runContainer16) andCardinality(a container) int {
1846 switch c := a.(type) {

Callers 1

intersectsMethod · 0.95

Calls 6

isFullMethod · 0.95
intersectMethod · 0.95
andArrayMethod · 0.95
andBitmapContainerMethod · 0.95
cloneMethod · 0.65
toEfficientContainerMethod · 0.65

Tested by

no test coverage detected