package grenier
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
A collection of various algorithms in OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
grenier-0.17.tbz
sha256=adce547fae9b5648d902d91173bb787466a197f81610b76757424ab33980e625
sha512=dccce42254660831fbd45129718ce01d2a4fcf10d05fa40f10eb3be4e5c94300af7235cc88c76b2e5aff7a02b8a1e8e6150d2d3376d8b630911d1dc6247b7df6
doc/grenier.baltree/Bt1/index.html
Module Bt1Source
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 (max size l size r / min 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 (max size l size r)). NOT PROVEN
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page