Module Union_Find_Lattice.Valued
Valued union-find: these attach an optional Sig.VALUE to each equivalence class, with values forming a lattice.
module ArrayWithCopy
(Config : Parameters.ARRAY_CONFIG)
(Node : Parameters.NODE_WITH_COMPARE)
(Value : Parameters.VALUE with type node = Node.t) :
Sig.VALUED_UNION_FIND_LATTICE
with type node = Node.t
and type value = Value.tReference implementation: this implements union-find (with values) as a mutable array. Warning: it is NOT persistent, but provides a copy function
module PatriciaTree
(Config : Parameters.PATRICIA_TREE_CONFIG)
(Node : Parameters.NODE)
(Value : Parameters.VALUE with type node = Node.t) :
Sig.VALUED_UNION_FIND_LATTICE
with type node = Node.t
and type value = Value.tPatricia-tree based union-find lattice with attached values.
module PersistentArray
(Config : Parameters.PERSISTENT_ARRAY_CONFIG)
(Node : Parameters.NODE)
(Value : Parameters.VALUE with type node = Node.t) :
Sig.VALUED_UNION_FIND_LATTICE
with type node = Node.t
and type value = Value.tPersistent-array based union-find lattice with attached values
module PersistentArrayNCA
(Config : Parameters.PERSISTENT_ARRAY_CONFIG)
(Node : Parameters.NODE)
(Value : Parameters.VALUE with type node = Node.t) :
Sig.VALUED_UNION_FIND_LATTICE
with type node = Node.t
and type value = Value.tPersistent-array based union-find lattice with attached values. Same as PersistentArray, but builds join on the nearest common ancestor instead of on one of the arguments.