Module Union_Find_Lattice.Polymorphic

Polymorphic labeled union-find I.E. this is a variant of Labeled, where instead of having simple type node and relation, we use polymorphic type 'a node, ('a, 'b) relation. An ('a,'b) relation relates a 'a node and a 'b node.

Array based polymorphic labeled union-find lattice with values. Warning: this one is NOT persistent, and requires explicit calls to copy on version switch.

Patricia Tree based polymorphic labeled union-find lattice with values.

Persistent array based polymorphic labeled union-find lattice with values.

Persistent 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.