(balance-batched nodes)
Given a sequence of nodes who need to perform some balancing among their children, this returns a sequence of those nodes after the rebalancing has occurred. THIS FUNCTION ASSUMES A UNIFORM NODE ORDER (MIN-WIDTH).
Given a sequence of nodes who need to perform some balancing among their children, this returns a sequence of those nodes after the rebalancing has occurred. THIS FUNCTION ASSUMES A UNIFORM NODE ORDER (MIN-WIDTH).
(balance-single-seq s plan)
Takes a sequence of nodes and a plan for rebalancing, returns the rebalanced sequence.
Takes a sequence of nodes and a plan for rebalancing, returns the rebalanced sequence.
(combine lnode rnode)
If they're leaf nodes, it just combines the children collections. If they're internal nodes, it combines the children collections, tweaks the pivot keys, and distributes the messages.
If they're leaf nodes, it just combines the children collections. If they're internal nodes, it combines the children collections, tweaks the pivot keys, and distributes the messages.
(neighborhoods-matching pred c)
Given a sequence of things, finds all 'immediate neighborhoods' centered around elements matching pred. Example: (neighborhoods-matching even? [1 2 4 5 7 9 11 12]) => ((1 2 4 5) (11 12))
Given a sequence of things, finds all 'immediate neighborhoods' centered around elements matching pred. Example: (neighborhoods-matching even? [1 2 4 5 7 9 11 12]) => ((1 2 4 5) (11 12))
(plan-step c [action k :as step])
Given a collection of nodes, and an action from a plan sequence, this carries out that action on the collection, returning the result.
Given a collection of nodes, and an action from a plan sequence, this carries out that action on the collection, returning the result.
(resolve-touched-batch unbalanced plans)
Takes an ordered collection of unbalanced sequences, and a corresponding ordered collection of plans. Returns an almost identical ordered collection of unbalanced sequences, where any node-pointers 'touched' by the plans have been resolved in one large batch.
Takes an ordered collection of unbalanced sequences, and a corresponding ordered collection of plans. Returns an almost identical ordered collection of unbalanced sequences, where any node-pointers 'touched' by the plans have been resolved in one large batch.
(shift lnode rnode)
Moves n values (and associated messages) left or right, from lnode to rnode or rnode to lnode. Moves the minimal number possible to bring the underflowing node as close as possible to its minimum size.
Moves n values (and associated messages) left or right, from lnode to rnode or rnode to lnode. Moves the minimal number possible to bring the underflowing node as close as possible to its minimum size.
(shift-left lnode rnode n)
Shifts n children from the left side of rnode to the right side of lnode.
Shifts n children from the left side of rnode to the right side of lnode.
(shift-right lnode rnode n)
Shifts n children from the right side of lnode to the left side of rnode.
Shifts n children from the right side of lnode to the left side of rnode.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close