MCPcopy Create free account
hub / github.com/brimdata/super / Pick

Method Pick

vector/bitvec/bits.go:77–88  ·  view source on GitHub ↗
(index []uint32)

Source from the content-addressed store, hash-verified

75}
76
77func (b Bits) Pick(index []uint32) Bits {
78 if b.IsZero() || len(index) == 0 {
79 return Zero
80 }
81 out := NewFalse(uint32(len(index)))
82 for k, slot := range index {
83 if b.IsSetDirect(slot) {
84 out.Set(uint32(k))
85 }
86 }
87 return out
88}
89
90func (b Bits) ReversePick(index []uint32) Bits {
91 return b.Pick(ReverseIndex(index, b.length))

Callers 2

ReversePickMethod · 0.95
PickFunction · 0.80

Calls 4

IsZeroMethod · 0.95
IsSetDirectMethod · 0.95
NewFalseFunction · 0.70
SetMethod · 0.45

Tested by

no test coverage detected