DistanceFunction

DistanceFunction

is an option for functions such as Nearest that specifies the distance value to assume between any two specified points.

Details

  • DistanceFunction->f specifies that the distance assumed between x and y should be f[x,y].

Examples

Basic Examples  (2)

Find points closest to {5,5} using ChessboardDistance:

Use the default distance:

Find clusters in Boolean data using DiceDissimilarity:

Clusters obtained with the default distance function:

Introduced in 2007
 (6.0)