WLJS LogoWLJS Notebook

EdgeAdd

EdgeAdd[g, e] makes a graph by adding the edge e to the graph g.

EdgeAdd[g, {e1, e2, ...}] adds a collection of edges to g.

Examples

Add an edge to a graph:

EdgeAdd[Graph[{1 -> 2}], 2 -> 3]

Add multiple edges:

EdgeAdd[CycleGraph[4], {1 -> 3, 2 -> 4}]

Please visit the official Wolfram Language Reference for more details.

On this page