|
|
Locality-preserving hashing
Jump to navigation
Jump to search
In computer science, a locality-preserving hashing is a hash function f that maps a point or points in a multidimensional coordinate space to a scalar value, such that if we have three points A, B and C such that
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle |A-B| < |B-C| \Rightarrow |f(A) - f(B)| < |f(B) - f(C)|. \,}
In other words, these are hash functions where the relative distance between the input values is preserved in the relative distance between of the output hash values; input values that are closer to each other will produce output hash values that are closer to each other.
This is in contrast to cryptographic hash functions and checksums, which are designed to have maximum output difference between adjacent inputs.
Locality preserving hashes are related to space-filling curves and locality-sensitive hashing.