(metacopy:defcopy-methods graph-container-edge
:copy-all t)
+(defmethod generate-directed-free-tree ((graph basic-graph) (root basic-vertex))
+ (let ((new-graph (metacopy:copy-thing graph)))
+ (empty! new-graph)
+ (nilf (contains-undirected-edge-p new-graph))
+ (neighbors-to-children new-graph root)
+ (values new-graph)))
\ No newline at end of file
initial-contents-mixin
basic-graph
container-uses-nodes-mixin)
- ()
+ ((vertex-pair->edge (make-container 'simple-associative-container) r))
(:default-initargs
:vertex-class 'graph-container-vertex
:directed-edge-class 'graph-container-directed-edge
&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
:graph graph
:vertex-1 vertex-1 :vertex-2 vertex-2 args))
-
;;; ---------------------------------------------------------------------------
(defmethod make-graph ((graph-type symbol) &rest args &key &allow-other-keys)
;;; ---------------------------------------------------------------------------
-#+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)))