OBSOLETE GRAPH UTILITIES 程序包 符号

# NeighborhoodVertices

As of Version 10, all the functionality of the GraphUtilities package is built into the Wolfram System. >>

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)基本范例  (2)

 In[1]:=

This defines a simple directed graph:

 In[2]:=
 In[3]:=
 Out[3]=

This finds all vertices that can be reached from vertex 2 within 1 hop:

 In[4]:=
 Out[4]=

This finds all vertices that can be reached from vertex 2:

 In[5]:=
 Out[5]=

NeighborhoodVertices has been superseded by NeighborhoodGraph:

 In[1]:=
 Out[1]=
 In[2]:=
 Out[2]=
 In[3]:=
 Out[3]=