GraphTheory
AddArc
add arc to graph
Calling Sequence
Parameters
Description
Examples
AddArc(G, E)
AddArc(G, E, ip)
G
-
directed graph
E
arc, trail, or set of arcs
ip
(optional) equation of the form inplace=true or false
The AddArc command adds one or more arcs to a directed graph. By default, the original digraph is changed to a digraph containing the specified set of arc(s). By setting inplace=false, the original digraph remains unchanged and a new digraph containing the specified set of arcs is created.
If the graph is weighted, then a weighted arc can be added by calling AddArc with one or more arcs in the form , where the arc is just the from/to vertex pair, and the weight represents the value of the arc weight.
See Also
AddEdge
DeleteArc
Digraph
Edges
HasArc
Trail
Download Help Document