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

Method setHighest

bitarray/bitarray.go:54–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54func (ba *bitArray) setHighest() {
55 for i := len(ba.blocks) - 1; i >= 0; i-- {
56 if ba.blocks[i] == 0 {
57 continue
58 }
59
60 pos := ba.blocks[i].findLeftPosition()
61 ba.highest = (uint64(i) * s) + pos
62 ba.anyset = true
63 return
64 }
65
66 ba.anyset = false
67 ba.highest = 0
68 ba.lowest = 0
69}
70
71// capacity returns the total capacity of the bit array.
72func (ba *bitArray) Capacity() uint64 {

Callers 7

ClearBitMethod · 0.95
complementMethod · 0.95
orDenseWithDenseBitArrayFunction · 0.80

Calls 1

findLeftPositionMethod · 0.80

Tested by

no test coverage detected