Initialize configures the unset iterator to iterate over values in [start, end) that are not in the bitmap
(a *Bitmap, start, end uint64)
| 924 | |
| 925 | // Initialize configures the unset iterator to iterate over values in [start, end) that are not in the bitmap |
| 926 | func (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 |
| 946 | func (rb *Bitmap) String() string { |
nothing calls this directly
no test coverage detected