NearestFunction

NearestFunction[data]

represents a function whose values give the elements closest to an element that is supplied.

Details

Examples

open allclose all

Basic Examples  (1)

Generate a NearestFunction:

Apply to a single element:

Apply to several elements using Map:

Apply to several elements directly:

Scope  (3)

Give the 3 nearest elements:

Give the elements within radius 2:

Give the at most 3 nearest elements within radius 2:

When NearestFunction is directly applied to multiple points, results are computed in parallel threads if possible:

When the NearestFunction is applied to the points separately, results are computed serially:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_nearestfunction, author="Wolfram Research", title="{NearestFunction}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/NearestFunction.html}", note=[Accessed: 17-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_nearestfunction, organization={Wolfram Research}, title={NearestFunction}, year={2007}, url={https://reference.wolfram.com/language/ref/NearestFunction.html}, note=[Accessed: 17-November-2024 ]}