package containers
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=d84e09c5d0abc501aa17cd502e31a038
sha512=8b832f4ada6035e80d81be0cfb7bdffb695ec67d465ed6097a144019e2b8a8f909095e78019c3da2d8181cc3cd730cd48f7519e87d3162442562103b7f36aabb
doc/containers/CCHeap/module-type-S/index.html
Module type CCHeap.SSource
Filter values, only retaining the ones that satisfy the predicate. Linear time at least.
Extract and return the minimum element, and the new heap (without this element), or None if the heap is empty.
Delete one occurrence of a value if it exist in the heap. delete_one eq x h, use eq to find one x in h and delete it. If h do not contain x then it return h.
Delete all occurrences of a value in the heap. delete_all eq x h, use eq to find all x in h and delete them. If h do not contain x then it return h. The difference with filter is that delete_all stops as soon as it enters a subtree whose root is bigger than the element.
Conversions
The interface of of_gen, of_seq, of_klist has changed since 0.16 (the old signatures are now add_seq, add_gen, add_klist).
Add the elements of the list to the heap. An element occurring several times will be added that many times to the heap.