(&self, index: usize)
| 39 | } |
| 40 | impl Correlator { |
| 41 | fn matching(&self, index: usize) -> bool { |
| 42 | let ones = |
| 43 | ((self.shift_reg & 0x7FFFFFFE) ^ (CHIP_MAPPING[index] & 0x7FFFFFFE)).count_ones(); |
| 44 | ones < self.threshold |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | #[derive(Block)] |