GraphTheory
DeleteArc
delete arc from digraph
Calling Sequence
Parameters
Description
Examples
DeleteArc(G, E, ip)
G
-
directed graph
E
arc, trail, or set of arcs
ip
(optional)equation of the form inplace=true or false
The DeleteArc command deletes one or more arcs from a directed graph. By default, the original digraph is changed to a digraph missing the specified set of arcs. By setting inplace=false the original digraph remains unchanged and a new digraph missing the specified set of arcs is created.
If the digraph is a weighted digraph, then if a weight is also provided (i.e. arc,weight instead of arc) that weight is subtracted from the arc weight, which will not necessarily remove the arc from the digraph. If no weight is provided, the arc is removed regardless of the weight.
with⁡GraphTheory:
G≔Digraph⁡a,b,c,d,a,b,b,c,c,d,d,a
G≔Graph 1: a directed graph with 4 vertices and 4 arc(s)
H≔DeleteArc⁡G,d,a,inplace=false
H≔Graph 2: a directed graph with 4 vertices and 3 arc(s)
Edges⁡G
a,b,b,c,c,d,d,a
Edges⁡H
a,b,b,c,c,d
DeleteArc⁡G,a,b,c,d
Graph 1: a directed graph with 4 vertices and 2 arc(s)
b,c,d,a
See Also
AddArc
DeleteEdge
Digraph
Edges
HasArc
Trail
Download Help Document