NearestFunction
更多信息

- NearestFunction 工作方式与 Function 相似.
- NearestFunction 由 Nearest[data] 生成.
- NearestFunction[…][x] 给出与特定元素 x 最接近的元素.
- NearestFunction[…][{x1,x2,…}] 给出与每个 xi 最接近的元素的列表.
- NearestFunction[…][x,n] 给出 n 个最接近的元素.
- NearestFunction[…][x,{n,r}] 最多给出 n 个距离 x 半径为 r 范围内最近的元素.
- NearestFunction[…][x,{All,r}] 给出距离 x 半径为 r 范围内的所有元素.
范例
打开所有单元 关闭所有单元基本范例 (1)
范围 (3)
当 NearestFunction 直接用于多个点时,会尽量用并行线程计算结果:
当 NearestFunction 分别应用于各点,串行计算结果:
相关指南
-
▪
- 计算几何
文本
Wolfram Research (2007),NearestFunction,Wolfram 语言函数,https://reference.wolfram.com/language/ref/NearestFunction.html.
CMS
Wolfram 语言. 2007. "NearestFunction." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/NearestFunction.html.
APA
Wolfram 语言. (2007). NearestFunction. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/NearestFunction.html 年
BibTeX
@misc{reference.wolfram_2025_nearestfunction, author="Wolfram Research", title="{NearestFunction}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/NearestFunction.html}", note=[Accessed: 17-September-2025]}
BibLaTeX
@online{reference.wolfram_2025_nearestfunction, organization={Wolfram Research}, title={NearestFunction}, year={2007}, url={https://reference.wolfram.com/language/ref/NearestFunction.html}, note=[Accessed: 17-September-2025]}