hamming_bitwise {flintyR} | R Documentation |
Fast Bitwise Hamming Distance Vector Computation
Description
Takes in a binary matrix \mathbf{X}
, whose transpose \mathbf{X}^T
has N
rows, and computes a vector recording all
{N \choose 2}
pairwise Hamming distances of \mathbf{X}^T
,
ordered lexicographically.
Usage
hamming_bitwise(X)
Arguments
X |
binary matrix (IntegerMatrix class ) |
Value
vector of Hamming distances (NumericVector class)
Examples
# t(X) = [[1,0], [0,1], [1,1]] --> output = [2,1,1]
[Package flintyR version 0.1.0 Index]