MCPcopy Index your code
hub / github.com/Workiva/go-datastructures / complement

Method complement

bitarray/bitarray.go:318–327  ·  view source on GitHub ↗

complement flips all bits in this array.

()

Source from the content-addressed store, hash-verified

316
317// complement flips all bits in this array.
318func (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
329func (ba *bitArray) intersectsSparseBitArray(other *sparseBitArray) bool {
330 for i, index := range other.indices {

Callers 3

TestComplementFunction · 0.80
BenchmarkComplementFunction · 0.80

Calls 2

setLowestMethod · 0.95
setHighestMethod · 0.95

Tested by 3

TestComplementFunction · 0.64
BenchmarkComplementFunction · 0.64