pub fn simhash<T, const N: usize>(data: &[T]) -> Twhere
T: Num + FromPrimitive + WrappingSub + AddAssign + SubAssign + BitAnd<Output = T> + BitOrAssign + Shl<Output = T> + Copy,Expand description
Computes the SimHash of a set of data. This function is generic over all numeric types.
Note that:
- size_of(T) must equal to N bits
- the hash size must match the input bit width
Reimplementation of: https://github.com/acoustid/chromaprint/blob/516e3b31c7fa6e822035ea3b3e31f9c7f51ef4b6/src/simhash.cpp#L8