(a, b Bits)
| 149 | } |
| 150 | |
| 151 | func And(a, b Bits) Bits { |
| 152 | if a.IsZero() || b.IsZero() { |
| 153 | return Zero |
| 154 | } |
| 155 | if a.Len() != b.Len() { |
| 156 | panic("and'ing two different length bool vectors") |
| 157 | } |
| 158 | out := NewFalse(a.Len()) |
| 159 | for i := range len(a.bits) { |
| 160 | out.bits[i] = a.bits[i] & b.bits[i] |
| 161 | } |
| 162 | return out |
| 163 | } |
| 164 | |
| 165 | func ReverseIndex(index []uint32, n uint32) []uint32 { |
| 166 | var reverse []uint32 |