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

Interface container

roaringarray.go:13–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11)
12
13type container interface {
14 // addOffset returns the (low, high) parts of the shifted container.
15 // Whenever one of them would be empty, nil will be returned instead to
16 // avoid unnecessary allocations.
17 addOffset(uint16) (container, container)
18
19 clone() container
20 and(container) container
21 andCardinality(container) int
22 iand(container) container // i stands for inplace
23 andNot(container) container
24 iandNot(container) container // i stands for inplace
25 isEmpty() bool
26 getCardinality() int
27 // rank returns the number of integers that are
28 // smaller or equal to x. rank(infinity) would be getCardinality().
29 rank(uint16) int
30
31 // getCardinalityInRange returns the number of integers that are
32 // within the half-open range [start, end). It is equivalent to
33 // rank(end-1) - rank(start-1) but may be faster.
34 getCardinalityInRange(start, end uint) int
35
36 iadd(x uint16) bool // inplace, returns true if x was new.
37 iaddReturnMinimized(uint16) container // may change return type to minimize storage.
38
39 iaddRange(start, endx int) container // i stands for inplace, range is [firstOfRange,endx)
40
41 iremove(x uint16) bool // inplace, returns true if x was present.
42 iremoveReturnMinimized(uint16) container // may change return type to minimize storage.
43
44 not(start, final int) container // range is [firstOfRange,lastOfRange)
45 inot(firstOfRange, endx int) container // i stands for inplace, range is [firstOfRange,endx)
46 xor(r container) container
47 ixor(r container) container // i stands for inplace
48 getShortIterator() shortPeekable
49 getUnsetIterator() shortPeekable
50 iterate(cb func(x uint16) bool) bool
51 getReverseIterator() shortIterable
52 getManyIterator() manyIterable
53 contains(i uint16) bool
54 maximum() uint16
55 minimum() uint16
56
57 // equals is now logical equals; it does not require the
58 // same underlying container types, but compares across
59 // any of the implementations.
60 equals(r container) bool
61
62 fillLeastSignificant16bits(array []uint32, i int, mask uint32) int
63 or(r container) container
64 orCardinality(r container) int
65 isFull() bool
66 ior(r container) container // i stands for inplace
67 intersects(r container) bool // whether the two containers intersect
68 lazyOR(r container) container
69 lazyIOR(r container) container
70 getSizeInBytes() int

Callers 7

TestRle16Rank020Function · 0.85
TestBitmapOffsetFunction · 0.85
TestArrayContainerRankFunction · 0.85
TestArrayOffsetFunction · 0.85

Implementers 3

bitmapContainerbitmapcontainer.go
runContainer16runcontainer.go
arrayContainerarraycontainer.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…