Function acap::hamming::hamming_distance [−][src]
Expand description
Compute the Hamming distance between two integers.
\begin{aligned}
\mathrm{hamming\_distance}(x, y) &= |\{i \mid x_i \ne y_i\}| \\
&= \mathrm{popcount}(x \wedge y)
\end{aligned}