NeighborhoodVertices[g,i,r]
gives vertices that can be reached from vertex i within r hops.
NeighborhoodVertices[g,i]
gives vertices that can be reached from vertex i.
NeighborhoodVertices
NeighborhoodVertices[g,i,r]
gives vertices that can be reached from vertex i within r hops.
NeighborhoodVertices[g,i]
gives vertices that can be reached from vertex i.
更多信息和选项
- NeighborhoodVertices functionality is now available in the built-in Wolfram Language function NeighborhoodGraph.
- To use NeighborhoodVertices, you first need to load the Graph Utilities Package using Needs["GraphUtilities`"].
- NeighborhoodVertices returns the vertices that can be reached from a given vertex within certain hops.
范例
基本范例 (2)
This defines a simple directed graph:
This finds all vertices that can be reached from vertex 2 within 1 hop:
This finds all vertices that can be reached from vertex 2:
NeighborhoodVertices has been superseded by NeighborhoodGraph:
相关指南
-
▪
- Graph Utilities Package ▪
- Graphs & Networks ▪
- Graph Visualization ▪
- Computation on Graphs ▪
- Graph Construction & Representation ▪
- Graphs and Matrices ▪
- Graph Properties & Measurements ▪
- Graph Operations and Modifications ▪
- Statistical Analysis ▪
- Social Network Analysis ▪
- Graph Properties ▪
- Mathematical Data Formats ▪
- Discrete Mathematics
文本
Wolfram Research (2007),NeighborhoodVertices,Wolfram 语言函数,https://reference.wolfram.com/language/GraphUtilities/ref/NeighborhoodVertices.html.
CMS
Wolfram 语言. 2007. "NeighborhoodVertices." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/GraphUtilities/ref/NeighborhoodVertices.html.
APA
Wolfram 语言. (2007). NeighborhoodVertices. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/GraphUtilities/ref/NeighborhoodVertices.html 年
BibTeX
@misc{reference.wolfram_2025_neighborhoodvertices, author="Wolfram Research", title="{NeighborhoodVertices}", year="2007", howpublished="\url{https://reference.wolfram.com/language/GraphUtilities/ref/NeighborhoodVertices.html}", note=[Accessed: 20-April-2026]}
BibLaTeX
@online{reference.wolfram_2025_neighborhoodvertices, organization={Wolfram Research}, title={NeighborhoodVertices}, year={2007}, url={https://reference.wolfram.com/language/GraphUtilities/ref/NeighborhoodVertices.html}, note=[Accessed: 20-April-2026]}