xanadu - btree

This commit is contained in:
erana 2012-01-21 16:47:38 +09:00
parent af119e61eb
commit 280a06663c
1 changed files with 2 additions and 20 deletions

View File

@ -31,10 +31,7 @@
;; copy vector nodes into n-ary vectors (from median splitted vecs) ;; copy vector nodes into n-ary vectors (from median splitted vecs)
(define (make-b-tree-node l r) (define (make-b-tree-node l r)
(let ((numitems 0) (let ((data #f)
(numnodes 0)
(root 'foo)
(data #f)
(left l) (left l)
(right r)) (right r))
@ -60,24 +57,9 @@
(define (get-right) (define (get-right)
right) right)
(define (get-root)
root)
(define (get-numitems)
numitems)
(define (get-numnodes)
numnodes)
(define (dispatch msg) (define (dispatch msg)
(lambda (msg) (lambda (msg)
(cond ((eq? msg 'get-root) (cond ((eq? msg 'get-left)
get-root)
((eq? msg 'get-numitems)
get-numitems)
((eq? msg 'get-numnodes)
get-numnodes)
((eq? msg 'get-left)
get-left) get-left)
((eq? msg 'set-left-with-index!) ((eq? msg 'set-left-with-index!)
set-left-with-index!) set-left-with-index!)