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 and Options
- EdgeContract is also known as edge collapse.
- EdgeContract[g,e] creates a new graph from g by deleting the edge e and merging vertices of e.
- EdgeContract works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examples
open allclose allScope (7)
EdgeContract works with undirected graphs:
Use rules to specify the graph:
Use patterns to specify a set of edges:
EdgeContract works with large graphs:
Properties & Relations (1)
EdgeContract can be computed using VertexContract:
Text
Wolfram Research (2014), EdgeContract, Wolfram Language function, https://reference.wolfram.com/language/ref/EdgeContract.html (updated 2015).
CMS
Wolfram Language. 2014. "EdgeContract." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/EdgeContract.html.
APA
Wolfram Language. (2014). EdgeContract. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EdgeContract.html