Skip to main content

majority_simhash

Function majority_simhash 

Source
pub fn majority_simhash(hashes: &[u64]) -> u64
Expand description

Compute per-bit majority vote SimHash from a set of hashes.

For each of the 64 bit positions, sets the output bit to 1 if more than half the input hashes have that bit set. This produces the “centroid” in SimHash space — the representative that minimizes Hamming distance to the input set.