Action:
|
Adds an edge to a graph.
|
|
Filename:
|
kern/kern_scm/graph_scm.cxx
|
|
Syntax:
|
(graph:add-edge output-graph vertex1 vertex2)
|
|
Arg Types:
|
output-graph
|
graph
|
|
vertex1
|
string | entity
|
|
vertex2
|
string | entity
|
|
Returns:
|
graph
|
|
Description:
|
This extension adds an edge to an existing graph between two existing vertices.
|
|
|
output-graph specifies a graph. The
output-graph is updated to show the new connection between vertices.
|
|
|
The
vertex1 and
vertex2 elements are required to be part of the
output-graph. If the
output-graph was created using face entities as the vertices, the
vertex1 and
vertex2 can be either the face entities or their designation as part of the graph.
|
|
Example:
|
; graph:add-edge
|
|
; Create a simple example
|
|
(define g1 (graph "me-you us-them"))
|
|
;; g1
|
|
; Add a new edge between two existing vertices
|
|
(define g2 (graph:add-edge g1 "me" "them"))
|
|
;; g2
|