module PersistentUnionFind: sig
.. end
A persistent version of the classic union-find algorithm.
type
point
type 'a
state
val init : unit -> 'a state
val create : 'a ->
'a state ->
point * 'a state
val same : point ->
point -> 'a state -> bool
val union : point ->
point ->
'a state -> 'a state
val find : point -> 'a state -> 'a
val update : ('a -> 'a) ->
point ->
'a state -> 'a state
val union_computed : ('a -> 'a -> 'a) ->
point ->
point ->
'a state -> 'a state
val iter : ('a -> unit) -> 'a state -> unit
val fold : ('acc -> point -> 'a -> 'acc) ->
'acc -> 'a state -> 'acc
val compare : point -> point -> int
val repr : point ->
'a state -> point
val valid : point -> 'a state -> bool