Skip to main content

kgram_hashes

Function kgram_hashes 

Source
pub fn kgram_hashes(units: &[u64], k: usize) -> Vec<u64>
Expand description

Rolling polynomial hashes of every k-gram of units (mod 2^64): gram(i) = units[i]·B^(k-1) + … + units[i+k-1].

Returns an empty vector when the input is shorter than k.