package grenier
A collection of various algorithms in OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
grenier-0.15.tbz
sha256=dec7f84b9e93d5825f10c7dea84d5a74d7365ede45664ae63c26b5e8045c1c44
sha512=b8aa1569c2e24b89674d1b34de34cd1798896bb6a53aa5a1287f68cee880125e6b687f66ad73da9069a01cc3ece1f0684f48328b099d43529bff736b772c8fd8
doc/grenier.baltree/Bt1/index.html
Module Bt1
Source
Type of balanced trees with one custom value
Smart Node constructor, ensuring that the resulting tree is balanced and has the appropriate size.
Cost of node l x r
is expected to be O(log |size l
- size r
|) amortized, i.e proportional to the logarithm of the disbalance. In particular, if l
and r
are similarly-sized, it operates in constant time on average. NOT PROVEN
User-values can be moved in different subtrees of the result, but the ordering is preserved (so data stay correct if the operation applied on values is associative or the relation expected between them is transitive).
Convenience functions
Concatenate two trees. Cost of join l r
is O(log (min size l
size r
)). NOT PROVEN
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page