A module internal to Incremental. Users should see Incremental_intf.
The recompute heap holds the set of nodes such that Node.needs_to_be_computed. It
is used during stabilization to visit the nodes that need to be computed in
topological order, using the recompute heap to visit them in increasing order of
height.
include sig ... endval sexp_of_t : t ‑> Base.Sexp.tval create : max_height_allowed:int ‑> tval length : t ‑> intval max_height_allowed : t ‑> intmax_height_allowed is the maximum node.height allowed for node in t.
It is an error to call set_max_height_allowed t m if there is a node in t with
node.height > m.
val set_max_height_allowed : t ‑> int ‑> unitval min_height : t ‑> intmin_height t returns the smallest height of any element in t, or
max_height_allowed + 1 if length t = 0.
val add : t ‑> _ Incremental_kernel__.Node.t ‑> unitadd t node should only be called iff:
not (Node.is_in_recompute_heap node)
&& Node.needs_to_be_computed node
&& node.height <= max_height_allowed tval remove : t ‑> _ Incremental_kernel__.Node.t ‑> unitremove t node should only be called iff:
Node.is_in_recompute_heap node
&& not (Node.needs_to_be_computed node)val remove_min : t ‑> Incremental_kernel__.Node.Packed.tremove_min t removes and returns a node in t with minimum height. remove_min
should only be called if length t > 0.
val increase_height : t ‑> _ Incremental_kernel__.Node.t ‑> unitincrease_height t node should only be called when:
node.height > node.height_in_recompute_heapnode.height <= max_height_allowed tNode.is_in_recompute_heap nodeIt changes node.height_in_recompute_heap to equal node.height and adjusts node's
position in t.