package batteries
A community-maintained standard library extension
Install
Dune Dependency
Authors
Maintainers
Sources
v3.5.1.tar.gz
md5=d3d16ffc960e832a1c0e21b7123194e9
sha512=36c8561079aa9fefc864c2f03bd8ae20aa05987bb67e7a9beac3ab4f440dbf7d44f141c172b05fddb1a5b618fc55a27962bb45fc39bd7b3a15d56e0ed3ff3870
doc/batteries.unthreaded/BatAvlTree/index.html
Module BatAvlTree
Internals of ISet and IMap, usable as generic tree library
val empty : 'a tree
val is_empty : 'a tree -> bool
create l v r
is similar to make_tree l v r
but performs no rebalancing; in other words, you should use this only when you know that l
and r
are already balanced.
val height : 'a tree -> int
val root : 'a tree -> 'a
val singleton_tree : 'a -> 'a tree
val iter : ('a -> unit) -> 'a tree -> unit
val fold : ('a -> 'b -> 'b) -> 'a tree -> 'b -> 'b
val check : 'a tree -> bool
Check that the tree is balanced according to the AVL tree rules. An AVL tree is balanced when for every node the height of the subnodes differs by at most 1.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>