MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / map_string

Function map_string

nodedb-array/src/coord/normalize.rs:125–127  ·  view source on GitHub ↗

String dims fall back to a deterministic hash bucket. Hilbert/Z-order over strings is inherently lossy — preserves equality, not ordering. Future work may swap in dictionary-based sort-preserving codes.

(v: &str, max: u64)

Source from the content-addressed store, hash-verified

123/// over strings is inherently lossy — preserves equality, not ordering.
124/// Future work may swap in dictionary-based sort-preserving codes.
125fn map_string(v: &str, max: u64) -> u64 {
126 super::string_hash::hash_string_masked(v, max)
127}
128
129#[cfg(test)]
130mod tests {

Callers 1

normalize_oneFunction · 0.85

Calls 1

hash_string_maskedFunction · 0.85

Tested by

no test coverage detected