X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=dev%2Fcopying.lisp;h=ad94e3a83c3001fefded28a75ddf3fe524672e12;hb=25d9c9819ce0bb610c024c3ef760660e76653c21;hp=edb5dbeb4244192eafb034e653f8844d4286e16b;hpb=65b29b990908dd664a3326096cdc78cb36a07162;p=cl-graph.git diff --git a/dev/copying.lisp b/dev/copying.lisp index edb5dbe..ad94e3a 100644 --- a/dev/copying.lisp +++ b/dev/copying.lisp @@ -1,4 +1,4 @@ -(in-package cl-graph) +(in-package #:cl-graph) (metacopy:defcopy-methods basic-vertex :copy-all t) @@ -19,3 +19,9 @@ (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