Remove the integer x from the bitmap
(x uint64)
| 353 | |
| 354 | // Remove the integer x from the bitmap |
| 355 | func (rb *Bitmap) Remove(x uint64) { |
| 356 | hb := highbits(x) |
| 357 | i := rb.highlowcontainer.getIndex(hb) |
| 358 | if i >= 0 { |
| 359 | c := rb.highlowcontainer.getWritableContainerAtIndex(i) |
| 360 | c.Remove(lowbits(x)) |
| 361 | if c.IsEmpty() { |
| 362 | rb.highlowcontainer.removeAtIndex(i) |
| 363 | } |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | // CheckedRemove removes the integer x from the bitmap and return true if the integer was effectively remove (and false if the integer was not present) |
| 368 | func (rb *Bitmap) CheckedRemove(x uint64) bool { |