X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=dev%2Fgraph.lisp;h=caa6cb6f944bc9359e3481ee416c27e1c3a4cc33;hb=24c645986ed5cc5b0b26605cbe2f44873870a624;hp=b2c1cf3bb669b7ca1c45e611f4146362f6ba72b9;hpb=5282d117ab0e8b7080bca9683e270f0d2a8f4d5c;p=cl-graph.git diff --git a/dev/graph.lisp b/dev/graph.lisp index b2c1cf3..caa6cb6 100644 --- a/dev/graph.lisp +++ b/dev/graph.lisp @@ -14,7 +14,7 @@ something is putting something on the vertexes plist's |# -(in-package metabang.graph) +(in-package #:metabang.graph) ;;; --------------------------------------------------------------------------- ;;; classes @@ -222,18 +222,6 @@ something is putting something on the vertexes plist's &allow-other-keys) (remf args :edge-class) (remf args :edge-type) - - #| I removed 'em, gwk - - ;;; I added these - jjm - (remf args :vertex-test) - (remf args :vertex-key) - (remf args :edge-key) - (remf args :edge-test) - (remf args :force-new?) - -|# - (assert (or (null edge-type) (eq edge-type :directed) (eq edge-type :undirected)) nil @@ -256,7 +244,6 @@ something is putting something on the vertexes plist's :graph graph :vertex-1 vertex-1 :vertex-2 vertex-2 args)) - ;;; --------------------------------------------------------------------------- (defmethod make-graph ((graph-type symbol) &rest args &key &allow-other-keys) @@ -494,6 +481,11 @@ something is putting something on the vertexes plist's (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) @@ -804,16 +796,6 @@ something is putting something on the vertexes plist's ;;; --------------------------------------------------------------------------- -#+COPYING -(defmethod generate-directed-free-tree ((graph basic-graph) (root basic-vertex)) - (let ((new-graph (copy-top-level graph))) - (empty! new-graph) - (nilf (contains-undirected-edge-p new-graph)) - (neighbors-to-children new-graph root) - (values new-graph))) - -;;; --------------------------------------------------------------------------- - (defmethod generate-directed-free-tree ((graph basic-graph) root) (generate-directed-free-tree graph (find-vertex graph root)))