projects
/
cl-graph.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added delete-all-edges
[cl-graph.git]
/
dev
/
graph-container.lisp
diff --git
a/dev/graph-container.lisp
b/dev/graph-container.lisp
index
544a0c4
..
345ee48
100644
(file)
--- a/
dev/graph-container.lisp
+++ b/
dev/graph-container.lisp
@@
-237,6
+237,14
@@
DISCUSSION
:test #'eq)))
edge)
:test #'eq)))
edge)
+(defmethod delete-all-edges ((graph graph-container))
+ (iterate-vertexes
+ graph
+ (lambda (vertex)
+ (empty! (vertex-edges vertex))))
+ (empty! (vertex-pair->edge graph))
+ graph)
+
;;; ---------------------------------------------------------------------------
(defmethod empty! :after ((graph graph-container))
;;; ---------------------------------------------------------------------------
(defmethod empty! :after ((graph graph-container))