EdgeList

EdgeList[g]

gives the list of edges for the graph g.

EdgeList[g,patt]

gives a list of edges that match the pattern patt.

EdgeList[{vw,},]

uses rules vw to specify the graph g.

Details

  • EdgeList is also known as lines, arcs, actors, or relations.
  • EdgeList returns the list of edges in the order used by the graph g.

Examples

open allclose all

Basic Examples  (3)

The edge list for an explicitly constructed graph:

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

The edge list for a parametrically constructed graph:

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

Find all edges that match a pattern:

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

Scope  (5)

Applications  (1)

Properties & Relations  (5)

See Also

EdgeCount  VertexList  AdjacencyMatrix  IncidenceMatrix  Graph

Introduced in 2010
(8.0)
| Updated in 2015
(10.3)