This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

DistanceFunction

DistanceFunction
is an option for functions such as Nearest that specifies the distance value to assume between any two specified points.
  • DistanceFunction->f specifies that the distance assumed between x and y should be .
Find points closest to using ChessboardDistance:
Use the default distance:
Find clusters in Boolean data using DiceDissimilarity:
Clusters obtained with the default distance function:
Find points closest to using ChessboardDistance:
In[1]:=
Click for copyable input
Out[1]=
Use the default distance:
In[2]:=
Click for copyable input
Out[2]=
 
Find clusters in Boolean data using DiceDissimilarity:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Clusters obtained with the default distance function:
In[3]:=
Click for copyable input
Out[3]=
New in 6