DeleteEdge - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


GraphTheory

  

DeleteEdge

  

delete edge from graph

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

DeleteEdge(G, E, ip)

Parameters

G

-

undirected graph

E

-

edge, trail, or set of edges

ip

-

(optional) equation of the form inplace=true or false

Description

• 

The DeleteEdge command deletes one or more edges from an undirected graph. By default, the original graph is changed to a graph missing the specified set of edges. By setting inplace=false the original graph remains unchanged and a new graph missing the specified set of edges is created.

• 

If the graph is a weighted graph, then if a weight is also provided (i.e. edge,weight instead of edge) that weight is subtracted from the edge weight, which will not necessarily remove the edge from the graph. If no weight is provided, the edge is removed regardless of the weight.

Examples

withGraphTheory:

GCycleGraph4

GGraph 1: an undirected graph with 4 vertices and 4 edge(s)

(1)

HDeleteEdgeG,1,2,inplace=false

HGraph 2: an undirected graph with 4 vertices and 3 edge(s)

(2)

EdgesG

1,2,1,4,2,3,3,4

(3)

EdgesH

1,4,2,3,3,4

(4)

DeleteEdgeG,1,2,3,4

Graph 1: an undirected graph with 4 vertices and 2 edge(s)

(5)

EdgesG

1,4,2,3

(6)

See Also

AddEdge

CycleGraph

DeleteArc

Edges

Graph

HasEdge

Trail