powered by
Computes all pairwise Hamming distances for a binary matrix \(\mathbf{X}\).
getHammingDistance(X)
A length \({N \choose 2}\) vector of pairwise Hamming distances
The \(N \times P\) binary matrix
Dependencies: hamming_bitwise from fast_dist_calc.cpp
X <- matrix(nrow = 5, ncol = 10, rbinom(50, 1, 0.5)) getHammingDistance(X)
Run the code above in your browser using DataLab