grasshopper2 Rhinorhino3d.com
Glossaryhamiŋ
Hamming
hamiŋ

A type of distance metric which counts the number of differences between two values, d(a,b)=∑i=1n[ai≠bi]. This metric is always expressed as an integer.

For points, the hamming metric yields the number of differing coordinates. E.g. two points which only differ in the z coordinate have a hamming distance of 1, regardless of the magnitude of the difference.

For text, the hamming metric yields the number of character substitutions required to turn one text into another. This is a very naïve metric which may yield widely different distances for similar text pairs. E.g. the Hamming distance between "ABCD" and "ABC" is one, as only a single change needs to be made. However, the distance between "ABCD" and "BCD" is four as each character in the second text needs to be replaced to make it identical to the lined up character in the first text.