Skip to main content

seeded_hash

Function seeded_hash 

Source
pub fn seeded_hash(seed: u64, s: &str) -> u64
Expand description

Deterministic hash of (seed, s) – the tie-breaking/spreading mechanism bounded top-K sampling uses to pick “which items” deterministically. Each part is hashed with an explicit length prefix so a naive concatenation can’t collide across the seed/string boundary.