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.

IncidenceList[{vw,},]

uses rules vw to specify the graph g.

Details

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

Examples

open allclose all

Basic Examples  (3)

A list of edges incident to vertex 1:

Find all vertices adjacent to vertices that match the pattern:

Highlight incidence edges:

Scope  (6)

IncidenceList works with undirected graphs:

Directed graphs:

Use rules to specify the graph:

Use patterns to obtain edges incident to a selected subset of vertices:

Obtain incident edges d steps away from a vertex:

IncidenceList works with large graphs:

Properties & Relations  (2)

IncidenceList can be found using NeighborhoodGraph:

AdjacencyList can be found using IncidenceList:

Introduced in 2012
 (9.0)
 |
Updated in 2015
 (10.3)