NeighborhoodSubgraph

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


gives a subgraph consisting of vertices that can be reached from vertex i within r hops.


gives a subgraph consisting of vertices that can be reached from vertex i.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

In[1]:=
Click for copyable input

This defines a simple directed graph:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=

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

In[5]:=
Click for copyable input
Out[5]=

has been superseded by NeighborhoodGraph:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=