VocabularygraphvizInputsOutputsWord descriptionAdds an
edge in
graph from
tail to
head. That is,
X Y add-edge
is shorthand for
X Y <edge> add
ExamplesUSING: accessors graphviz io kernel sequences ;
<graph>
1 2 add-edge
3 4 add-edge
1 2 add-edge ! duplicate
5 6 add-edge
statements>> [ dup tail>> write "--" write head>> print ] each
1--2
3--4
1--2
5--6
USING: accessors graphviz io kernel math.combinatorics
sequences ;
<graph>
{ "a" 2 "c" }
2 [ first2 add-edge ] each-combination
statements>> [ dup tail>> write "--" write head>> print ] each
a--2
a--c
2--c
See also->,
~->Definition