HammingDistance

HammingDistance[u,v]

gives the Hamming distance between strings or vectors u and v.

Details and Options

Examples

open allclose all

Basic Examples  (2)

Hamming distance between two strings:

Hamming distance between two vectors:

Scope  (2)

Compute distance between any strings of equal length:

Compute distance between any vectors of equal length:

Options  (1)

IgnoreCase  (1)

Obtain Hamming distance, ignoring case of letters:

Applications  (2)

Cluster string data using Hamming distance:

Cluster numeric data using Hamming distance:

Properties & Relations  (2)

HammingDistance is equivalent to ManhattanDistance for 0, 1 data:

HammingDistance is greater than or equal to EditDistance:

Introduced in 2007
 (6.0)