Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Graph Utilities Package >

NeighborhoodVertices


gives vertices that can be reached from vertex i within r hops.

gives vertices that can be reached from vertex i.
  • returns the vertices that can be reached from a given vertex within certain hops.
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:
Needs["GraphUtilities`"]
This defines a simple directed graph:
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
This finds all vertices that can be reached from vertex 2 within 1 hop:
In[4]:=
Click for copyable input
Out[4]=
This finds all vertices that can be reached from vertex 2:
In[5]:=
Click for copyable input
Out[5]=
This imports a sparse matrix, and finds a layout of the vertices:
This shows all vertices of hope 1, 2, 3 from vertex 1:
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF