Handbook
Glossary
remove-vertex ( vertex edges graph -- )
Factor handbook
»
The language
»
Collections
»
Directed graph utilities
Prev:
add-vertex ( vertex edges graph -- )
Next:
closure ( vertex quot: ( vertex -- edges ) -- set )
Vocabulary
graphs
Inputs
vertex
an
object
edges
a
sequence
graph
an
assoc
mapping vertices to
set
s of edges
Outputs
None
Word description
Removes a vertex from a graph, using the given edges sequence.
Notes
The
edges
sequence must have all the values passed to
add-vertex
, otherwise some vertices of the graph may continue to refer to the removed vertex.
Side effects
Modifies
graph
Definition
USING:
assocs
kernel
sequences
sets
;
IN:
graphs
:
remove-vertex
( vertex edges graph -- )
[
at
delete
]
curry
with
each
;
inline