: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))
(delete-item (graph-edges graph) edge)
edge)
+
+(defmethod delete-all-edges :after ((graph basic-graph))
+ (empty! (graph-edges graph))
+ graph)
+
;;; ---------------------------------------------------------------------------
(defmethod delete-vertex ((graph basic-graph) value-or-vertex)
#:add-edge ; graph edge
#:delete-edge ; graph edge
-
+ #:delete-all-edges
+
#:add-vertex ; graph { value | vertex }
#:delete-vertex ; graph { value | vertex }
#:find-vertex ; graph { value | vertex }