GraphTheory[AddArc]
|
Calling Sequence
|
|
AddArc(G, E)
AddArc(G, E, ip)
|
|
Parameters
|
|
G
|
-
|
directed graph
|
E
|
-
|
arc, trail or set of arcs
|
ip
|
-
|
equation of the form inplace=true or false (optional)
|
|
|
|
|
Description
|
|
•
|
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.
|
|
|
Examples
|
|
>
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
>
|
|
| (10) |
>
|
|
| (11) |
>
|
|
| (12) |
|
|
Download Help Document
Was this information helpful?