(&self)
| 122 | /// the histogram; u32 is enough because we only have 2**14=16384 registers |
| 123 | #[inline] |
| 124 | fn get_histogram(&self) -> [u32; HLL_Q + 2] { |
| 125 | let mut histogram = [0; HLL_Q + 2]; |
| 126 | // hopefully this can be unrolled |
| 127 | for r in self.registers { |
| 128 | histogram[r as usize] += 1; |
| 129 | } |
| 130 | histogram |
| 131 | } |
| 132 | |
| 133 | /// Merge the other [`HyperLogLog`] into this one |
| 134 | pub fn merge(&mut self, other: &HyperLogLog<T>) { |