Merge branch 'master' of github.com:froydnj/trees
[trees.git] / patricia.lisp
1 (in-package :trees)
2
3 (defmethod make-binary-tree-node ((tree patricia-tree) item)
4   (let ((null-node (sentinel-node tree)))
5     (make-instance 'patricia-tree-node
6                    :left null-node
7                    :right null-node
8                    :parent null-node
9                    :datum item)))
10
11 (defmethod make-binary-tree ((type (eql :patricia)) &key compfun eqfun keyfun)
12   (let ((sentinel-node (make-sentinel-node 'patricia-tree-node)))
13     (make-instance 'patricia-tree
14                    :compfun compfun
15                    :eqfun eqfun
16                    :keyfun keyfun)))
17
18 (defmethod insert-at-node ((tree patricia-tree) item parent direction-stack)
19   )
20
21 (defmethod tree-delete-nonempty ((tree patricia-tree) deleted child low-subtree)
22   )