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:

The edge list for a parametrically constructed graph:

Find all edges that match a pattern:

Scope  (5)

EdgeList works with undirected graphs:

Directed graphs:

Use rules to specify the graph:

Use a pattern to select a subset of edges:

EdgeList works with large graphs:

Applications  (1)

Find all edges with a given annotation:

Properties & Relations  (5)

EdgeCount can be found using EdgeList:

Edges in EdgeList are given in the same order they are entered for Graph:

Columns of the incidence matrix correspond to EdgeList:

Edges can be explicitly specified in Graph:

TreeGraph:

PathGraph:

A connected graph can be reconstructed from its edge list:

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