BinaryDistance

BinaryDistance[u,v]

gives the binary distance between vectors u and v, equal to 0 if they are identical and 1 otherwise.

Details

Examples

open allclose all

Basic Examples  (2)

Binary distance between numeric vectors:

Binary distance between two identical symbolic vectors:

Scope  (4)

Compute distance between arbitrary expressions:

Binary distance between numeric vectors of different length:

Binary distance between symbolic inputs:

Binary distance between two vectors:

Applications  (1)

Cluster data using BinaryDistance:

Properties & Relations  (3)

Approximate numbers may be considered identical:

BinaryDistance is effectively related to Equal:

Demonstrate the triangle inequality:

Possible Issues  (1)

The returned distance may not be completely simplified:

Simplify the result further:

Introduced in 2015
 (10.2)