IncidenceList

IncidenceList[g,v]
gives a list of edges incident to vertex v.

IncidenceList[g,patt]
gives a list of edges incident to vertices that match the pattern patt.

IncidenceList[g,patt,d]
gives a list of incident edges d steps away.

DetailsDetails

  • IncidenceList returns the list of edges in the order used by the graph g.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

A list of edges incident to vertex 1:

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

Find all vertices adjacent to vertices that match the pattern:

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

Highlight incidence edges:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Introduced in 2012
(9.0)