complement flips all bits in this array.
()
| 316 | |
| 317 | // complement flips all bits in this array. |
| 318 | func (ba *bitArray) complement() { |
| 319 | for i := uint64(0); i < uint64(len(ba.blocks)); i++ { |
| 320 | ba.blocks[i] = ^ba.blocks[i] |
| 321 | } |
| 322 | |
| 323 | ba.setLowest() |
| 324 | if ba.anyset { |
| 325 | ba.setHighest() |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | func (ba *bitArray) intersectsSparseBitArray(other *sparseBitArray) bool { |
| 330 | for i, index := range other.indices { |