distanceDist(x)
computes the distribution of the hamming distances between
all pairs of rows (even identical) in matrix x
.
distanceDist(x)
x | input matrix |
---|
a vector of the distance distribution
For a matrix \(\mathbf{X}\) of size \((n \times m)\), the distance distribution is a row-vector \(B\) of length \(n\), where \(B_i\) is the number of pairs of rows with hamming distance \(i\). Since pairs of identical rows are considered, \(B_0\) will always be \(n\).