package containers
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=03b80e963186e91ddac62ef645bf7fb2
sha512=c8f434808be540c16926bf03d89f394d33fc2d092f963a7b6d412481229e0a96290f1ad7c7d522415115d35426b7aa0b3fda4b991ddc321dad279d402c9a0c0b
doc/containers.data/CCWBTree/Make/index.html
Module CCWBTree.MakeSource
Parameters
Signature
nth i m returns the i-th key, value in the ascending order. Complexity is O(log (cardinal m)).
get_rank k m looks for the rank of k in m, i.e. the index of k in the sorted list of bindings of m. let (`At n) = get_rank k m in nth_exn n m = get m k should hold.
update k f m calls f (Some v) if get k m = Some v, f None otherwise. Then, if f returns Some v' it binds k to v', if f returns None it removes k.
Map values, giving both key and value. Will use WORD.of_list to rebuild keys.
split k t returns l, o, r where l is the part of the map with keys smaller than k, r has keys bigger than k, and o = Some v if k, v belonged to the map.
Like Map.S.merge.
extract_min m returns k, v, m' where k,v is the pair with the smallest key in m, and m' does not contain k.
extract_max m returns k, v, m' where k,v is the pair with the highest key in m, and m' does not contain k.
Randomly choose a (key,value) pair within the tree, using weights as probability weights.