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

Method SetIndex

libs/bits/bit_array.go:62–69  ·  view source on GitHub ↗

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

(i int, v bool)

Source from the content-addressed store, hash-verified

60// SetIndex sets the bit at index i within the bit array.
61// The behavior is undefined if i >= bA.Bits
62func (bA *BitArray) SetIndex(i int, v bool) bool {
63 if bA == nil {
64 return false
65 }
66 bA.mtx.Lock()
67 defer bA.mtx.Unlock()
68 return bA.setIndex(i, v)
69}
70
71func (bA *BitArray) setIndex(i int, v bool) bool {
72 if i >= bA.Bits {

Callers 14

NewPartSetFromDataFunction · 0.95
randBitArrayFunction · 0.95
TestBytesFunction · 0.95
TestEmptyFullFunction · 0.95
TestJSONMarshalUnmarshalFunction · 0.95
UnmarshalJSONMethod · 0.95
addVerifiedVoteMethod · 0.45
addVerifiedVoteMethod · 0.45
AddPartMethod · 0.45
BitArrayMethod · 0.45
setHasVoteMethod · 0.45

Calls 3

setIndexMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by 4

randBitArrayFunction · 0.76
TestBytesFunction · 0.76
TestEmptyFullFunction · 0.76
TestJSONMarshalUnmarshalFunction · 0.76