(&mut self, hash: u64)
| 113 | /// by [`Self::add`]. |
| 114 | #[inline] |
| 115 | pub(crate) fn add_hashed(&mut self, hash: u64) { |
| 116 | let index = (hash & HLL_P_MASK) as usize; |
| 117 | let p = ((hash >> HLL_P) | (1_u64 << HLL_Q)).trailing_zeros() + 1; |
| 118 | self.registers[index] = self.registers[index].max(p as u8); |
| 119 | } |
| 120 | |
| 121 | /// Get the register histogram (each value in register index into |
| 122 | /// the histogram; u32 is enough because we only have 2**14=16384 registers |
no test coverage detected