MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / GetIndex

Method GetIndex

libs/bits/bit_array.go:44–51  ·  view source on GitHub ↗

GetIndex returns the bit at index i within the bit array. The behavior is undefined if i >= bA.Bits

(i int)

Source from the content-addressed store, hash-verified

42// GetIndex returns the bit at index i within the bit array.
43// The behavior is undefined if i >= bA.Bits
44func (bA *BitArray) GetIndex(i int) bool {
45 if bA == nil {
46 return false
47 }
48 bA.mtx.Lock()
49 defer bA.mtx.Unlock()
50 return bA.getIndex(i)
51}
52
53func (bA *BitArray) getIndex(i int) bool {
54 if i >= bA.Bits {

Callers 2

TestAndFunction · 0.45
TestOrFunction · 0.45

Calls 3

getIndexMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by 2

TestAndFunction · 0.36
TestOrFunction · 0.36