Pairing_heap.Unsafe
module Elt : sig ... end
val add_removable : 'a t -> 'a -> 'a Elt.t
add_removable t v returns a token that can be later used to remove v. Unlike the regular function, this unsafe version doesn't allocate.
add_removable t v
v
val remove : 'a t -> 'a Elt.t -> unit
remove t elt removes elt from t. Behavior is undefined and could lead to segfaults if t and elt don't match, if elt was already removed, or if the underlying value has already been removed (e.g., via pop).
remove t elt
elt
t
pop
val update : 'a t -> 'a Elt.t -> 'a -> 'a Elt.t
update t token v is shorthand for remove t token; add_removable t v.
update t token v
remove t token; add_removable t v