EdgeContract

EdgeContract[g,e]

contracts the edge e of the graph g.

EdgeContract[g,{e1,e2,}]

contracts a collection of edges e1,e2,.

EdgeContract[{vw,},]

uses rules vw to specify the graph g.

Details

  • EdgeContract[g,e] creates a new graph from g by deleting the edge e and merging the vertex v into u.
  • EdgeContract works with undirected graphs, directed graphs, multigraphs, and mixed graphs.

Examples

open allclose all

Basic Examples  (1)

Contract edges of a graph:

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

Scope  (7)

Properties & Relations  (1)

See Also

VertexContract  EdgeDelete  EdgeAdd  VertexAdd  VertexDelete  VertexReplace

Introduced in 2014
(10.0)
| Updated in 2015
(10.3)