WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

DistanceFunction

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

Details
Details and Options Details and Options
Examples  
Basic Examples  
See Also
Tech Notes
Related Guides
History
Cite this Page

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:

Wolfram Research (2007), DistanceFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/DistanceFunction.html.

Text

Wolfram Research (2007), DistanceFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/DistanceFunction.html.

CMS

Wolfram Language. 2007. "DistanceFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DistanceFunction.html.

APA

Wolfram Language. (2007). DistanceFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DistanceFunction.html

BibTeX

@misc{reference.wolfram_2025_distancefunction, author="Wolfram Research", title="{DistanceFunction}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/DistanceFunction.html}", note=[Accessed: 05-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_distancefunction, organization={Wolfram Research}, title={DistanceFunction}, year={2007}, url={https://reference.wolfram.com/language/ref/DistanceFunction.html}, note=[Accessed: 05-December-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /