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

Method Initialize

roaring.go:926–943  ·  view source on GitHub ↗

Initialize configures the unset iterator to iterate over values in [start, end) that are not in the bitmap

(a *Bitmap, start, end uint64)

Source from the content-addressed store, hash-verified

924
925// Initialize configures the unset iterator to iterate over values in [start, end) that are not in the bitmap
926func (iui *unsetIterator) Initialize(a *Bitmap, start, end uint64) {
927 if end > 0x100000000 {
928 panic("end > 0x100000000")
929 }
930 iui.start = start
931 iui.end = end
932 iui.containerIndex = 0
933 iui.nextKey = int(start >> 16)
934 iui.highlowcontainer = &a.highlowcontainer
935
936 // Find the first container that matches or exceeds the start key
937 for iui.containerIndex < iui.highlowcontainer.size() &&
938 int(iui.highlowcontainer.getKeyAtIndex(iui.containerIndex)) < iui.nextKey {
939 iui.containerIndex++
940 }
941
942 iui.init()
943}
944
945// String creates a string representation of the Bitmap
946func (rb *Bitmap) String() string {

Callers

nothing calls this directly

Calls 3

initMethod · 0.95
sizeMethod · 0.45
getKeyAtIndexMethod · 0.45

Tested by

no test coverage detected