Handbook
Glossary
add-nodes ( graph nodes -- graph' )
Graphviz
ยป
Graphviz data structures
Prev:
add-edge ( graph tail head -- graph' )
Next:
add-path ( graph nodes -- graph' )
Vocabulary
graphviz
Inputs
graph
a
graph
or a
subgraph
nodes
a
sequence
Outputs
graph'
a
graph
or a
subgraph
Word description
Adds a
node
to
graph
for each element in
nodes
, which must be a
sequence
of objects that are supported by the
present
word. Thus, the following two lines are equivalent:
{ X Y Z } add-nodes X add-node Y add-node Z add-node
Examples
USING: accessors graphviz prettyprint sequences ; <graph> { 8 6 7 5 3 0 9 "Jenny" "Jenny" } add-nodes statements>> length .
9
USING: accessors graphviz kernel math prettyprint sequences ; <graph> 100 [ "spam" ] replicate add-nodes statements>> [ id>> "spam" = ] all? .
t
See also
add
,
add-node
,
add-path
Definition
USING:
sequences
;
IN:
graphviz
:
add-nodes
( graph nodes -- graph' )
[
add-node
]
each
;