diff options
| author | 2025-01-16 18:56:53 -0500 | |
|---|---|---|
| committer | 2025-01-16 18:56:53 -0500 | |
| commit | 59b07ed6184c1c19b36a5fad42d09151c17dc89a (patch) | |
| tree | fd4385fb3e0b20e8a1acce4d5251ac89d1527288 /doc | |
succesfully test join
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/mcgoron.weight-balanced-trees.scm | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/doc/mcgoron.weight-balanced-trees.scm b/doc/mcgoron.weight-balanced-trees.scm new file mode 100644 index 0000000..0bebb3d --- /dev/null +++ b/doc/mcgoron.weight-balanced-trees.scm @@ -0,0 +1,34 @@ +(((name . "wb-tree-node?") + (signature lambda (x) => boolean?) + (desc "Returns true if `x` is a node in a weight-balanced tree.")) + ((name . "non-null-wb-tree-node?") + (signature lambda (x) => boolean?) + (desc "Returns true if `x` is a node with data and children.")) + ((name . "get-data") + (signature lambda ((non-null-wb-tree-node? x)) => *) + (desc "Returns the data in the tree node.")) + ((name . "get-left") + (signature lambda ((non-null-wb-tree-node? x)) => wb-tree-node?) + (desc "Returns the left child in the node.")) + ((name . "get-right") + (signature lambda ((non-null-wb-tree-node? x)) => wb-tree-node?) + (desc "Returns the right child in the node.")) + ((name . "get-size") + (signature lambda ((wb-tree-node? x)) => integer?) + (desc "Returns the number of elements in this tree.")) + ((name . "balanced?") + (signature lambda ((wb-tree-node? x)) => boolean?) + (tags internal) + (desc "Recursively traverses `x` and checks if it is weight balanced. +This function is not called in normal code, but can be useful for +debugging.")) + ((name . "in-order-vector->node") + (signature lambda ((vector? x)) => wb-tree-node?) + (desc " +* It is an error if `x` is not in order. + +Returns a weight-balanced tree where the elements of the tree are the +elements of `x`.")) + ((name . "node->in-order-list") + (signature lambda ((wb-tree-node? x)) => list?) + (desc "Returns a list of all elements of `x` in order.")))
\ No newline at end of file |
