chickadee » suffix-tree » make-suffix-tree



  • LEQ? is a less-than-or-equal procedure for comparing elements of the member lists
  • {{KEY->LIST} is a procedure that takes in a key value and returns a list

The returned selector procedure can take one of the following arguments:

inserts a new element (list); a procedure of the form (LAMBDA (K BVAL) ...) where K is a value of the type recognized by KEY->LIST and BVAL is the end-of-list value
looks up an element (list); a procedure of the form (LAMBDA (K) ...) where K is a value of the type recognized by KEY->LIST; returns the EOL value or #F if the given element is not found
partial lookup; returns the EOL value, #f or the subtree that corresponds to the given partial key
removes an element
merges the suffix tree with another; if there is a list that appears in both suffix trees, an exception is raised
splits the tree into three suffix-trees on the basis of the given element a. The first suffix-tree consists of branches with keys less than a (plus any EOL value), the second contains the branch (if any) associated with a, and the third consists of branches for keys greater than a