Module Union_Find_Lattice.PolymorphicValued
Polymorphic labeled union-find with values attached to each class. I.E. this is a variant of LabeledValued, where instead of having simple type node, relation, and value, we use polymorphic type 'a node, ('a, 'b) relation and 'b value.
module ArrayWithCopy
(Config : Parameters.ARRAY_CONFIG)
(Node : Parameters.POLYMORPHIC_NODE)
(Relation : Parameters.POLYMORPHIC_GROUP)
(Value :
Parameters.POLYMORPHIC_VALUE
with type ('a, 'b) relation = ('a, 'b) Relation.t
and type 'a node = 'a Node.t) :
Sig.POLYMORPHIC_LABELED_VALUED_UNION_FIND_LATTICE
with type 'a node = 'a Node.t
and type ('a, 'b) relation = ('a, 'b) Relation.t
and type 'a value = 'a Value.tArray based polymorphic labeled union-find lattice with values. Warning: this one is NOT persistent, and requires explicit calls to copy on version switch.
module PatriciaTree
(Config : Parameters.PATRICIA_TREE_CONFIG)
(Node : Parameters.POLYMORPHIC_NODE)
(Relation : Parameters.POLYMORPHIC_GROUP)
(Value :
Parameters.POLYMORPHIC_VALUE
with type ('a, 'b) relation = ('a, 'b) Relation.t
and type 'a node = 'a Node.t) :
Sig.POLYMORPHIC_LABELED_VALUED_UNION_FIND_LATTICE
with type 'a node = 'a Node.t
and type ('a, 'b) relation = ('a, 'b) Relation.t
and type 'a value = 'a Value.tPatricia Tree based polymorphic labeled union-find lattice with values.
module PersistentArray
(Config : Parameters.PERSISTENT_ARRAY_CONFIG)
(Node : Parameters.POLYMORPHIC_NODE)
(Relation : Parameters.POLYMORPHIC_GROUP)
(Value :
Parameters.POLYMORPHIC_VALUE
with type ('a, 'b) relation = ('a, 'b) Relation.t
and type 'a node = 'a Node.t) :
Sig.POLYMORPHIC_LABELED_VALUED_UNION_FIND_LATTICE
with type 'a node = 'a Node.t
and type ('a, 'b) relation = ('a, 'b) Relation.t
and type 'a value = 'a Value.tPersistent array based polymorphic labeled union-find lattice with values.
module PersistentArrayNCA
(Config : Parameters.PERSISTENT_ARRAY_CONFIG)
(Node : Parameters.POLYMORPHIC_NODE)
(Relation : Parameters.POLYMORPHIC_GROUP)
(Value :
Parameters.POLYMORPHIC_VALUE
with type ('a, 'b) relation = ('a, 'b) Relation.t
and type 'a node = 'a Node.t) :
Sig.POLYMORPHIC_LABELED_VALUED_UNION_FIND_LATTICE
with type 'a node = 'a Node.t
and type ('a, 'b) relation = ('a, 'b) Relation.t
and type 'a value = 'a Value.tPersistent array based polymorphic labeled union-find lattice with values. Same as PersitentArray, but builds join on the nearest common ancestor instead of one of the branches.