(index []uint32)
| 75 | } |
| 76 | |
| 77 | func (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 | |
| 90 | func (b Bits) ReversePick(index []uint32) Bits { |
| 91 | return b.Pick(ReverseIndex(index, b.length)) |
no test coverage detected