X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=dev%2Fcopying.lisp;fp=dev%2Fcopying.lisp;h=e20961a68feec391d4737b6ff22f15a495032520;hb=3e6caf777362fbe61b76b305e9b4aa1e80a60bc4;hp=edb5dbeb4244192eafb034e653f8844d4286e16b;hpb=900a931f109598249ebc33bea50b65abf998ed0b;p=cl-graph.git diff --git a/dev/copying.lisp b/dev/copying.lisp index edb5dbe..e20961a 100644 --- a/dev/copying.lisp +++ b/dev/copying.lisp @@ -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