ligo/vendors/UnionFind
2020-04-29 21:32:50 +01:00
..
.gitignore Ignore UnionFind.install 2020-01-09 11:21:23 -06:00
.links update union-find library (part 1: remove old copy, download https://github.com/rinderknecht/UnionFind.git 3fc434d0d75e40d40d17f5abb70d86a51f434771 in new folder) 2020-01-08 18:12:00 +00:00
.PartitionMain.tag update union-find library (part 1: remove old copy, download https://github.com/rinderknecht/UnionFind.git 3fc434d0d75e40d40d17f5abb70d86a51f434771 in new folder) 2020-01-08 18:12:00 +00:00
build.sh update union-find library (part 1: remove old copy, download https://github.com/rinderknecht/UnionFind.git 3fc434d0d75e40d40d17f5abb70d86a51f434771 in new folder) 2020-01-08 18:12:00 +00:00
clean.sh update union-find library (part 1: remove old copy, download https://github.com/rinderknecht/UnionFind.git 3fc434d0d75e40d40d17f5abb70d86a51f434771 in new folder) 2020-01-08 18:12:00 +00:00
dune Added a polymorphic version of one of the UnionFind implementations 2020-04-13 23:10:01 +02:00
dune-project Dunification of the Red-Black_Trees library 2020-04-13 19:23:12 +02:00
LICENSE update union-find library (part 1: remove old copy, download https://github.com/rinderknecht/UnionFind.git 3fc434d0d75e40d40d17f5abb70d86a51f434771 in new folder) 2020-01-08 18:12:00 +00:00
Makefile.cfg update union-find library (part 1: remove old copy, download https://github.com/rinderknecht/UnionFind.git 3fc434d0d75e40d40d17f5abb70d86a51f434771 in new folder) 2020-01-08 18:12:00 +00:00
Partition0.ml typer: cleanup 2020-01-20 21:19:37 +01:00
Partition1.ml update union-find library (part 1: remove old copy, download https://github.com/rinderknecht/UnionFind.git 3fc434d0d75e40d40d17f5abb70d86a51f434771 in new folder) 2020-01-08 18:12:00 +00:00
Partition2.ml update union-find library (part 1: remove old copy, download https://github.com/rinderknecht/UnionFind.git 3fc434d0d75e40d40d17f5abb70d86a51f434771 in new folder) 2020-01-08 18:12:00 +00:00
Partition3.ml update union-find library (part 1: remove old copy, download https://github.com/rinderknecht/UnionFind.git 3fc434d0d75e40d40d17f5abb70d86a51f434771 in new folder) 2020-01-08 18:12:00 +00:00
Partition.mli update union-find library (part 1: remove old copy, download https://github.com/rinderknecht/UnionFind.git 3fc434d0d75e40d40d17f5abb70d86a51f434771 in new folder) 2020-01-08 18:12:00 +00:00
PartitionMain.ml update union-find library (part 1: remove old copy, download https://github.com/rinderknecht/UnionFind.git 3fc434d0d75e40d40d17f5abb70d86a51f434771 in new folder) 2020-01-08 18:12:00 +00:00
Poly2.ml moved core and solver types to the AST, removed functor hell (Map, Set, UnionFind) 2020-04-29 21:32:50 +01:00
Poly2.mli moved core and solver types to the AST, removed functor hell (Map, Set, UnionFind) 2020-04-29 21:32:50 +01:00
README.md update union-find library (part 1: remove old copy, download https://github.com/rinderknecht/UnionFind.git 3fc434d0d75e40d40d17f5abb70d86a51f434771 in new folder) 2020-01-08 18:12:00 +00:00
unionFind.ml Added a polymorphic version of one of the UnionFind implementations 2020-04-13 23:10:01 +02:00
UnionFind.opam Dunification of the Red-Black_Trees library 2020-04-13 19:23:12 +02:00

Some implementations in OCaml of the Union/Find algorithm

All modules implementing Union/Find can be coerced by the same signature Partition.S.

Note the function alias which is equivalent to equiv, but not symmetric: alias x y means that x is an alias of y, which translates in the present context as x not being the representative of the equivalence class containing the equivalence between x and y. The function alias is useful when managing aliases during the static analyses of programming languages, so the representatives of the classes are always the original object.

The module PartitionMain tests each with the same equivalence relations.

Partition0.ml

This is a naive, persistent implementation of Union/Find featuring an asymptotic worst case cost of O(n^2).

Partition1.ml

This is a persistent implementation of Union/Find with height-balanced forests and without path compression, featuring an asymptotic worst case cost of O(n*log(n)).

Partition2.ml

This is an alternate version of Partition1.ml, using a different data type.

Partition3.ml

This is a destructive implementation of Union/Find with height-balanced forests but without path compression, featuring an asymptotic worst case of O(n*log(n)). In practice, though, this implementation should be faster than the previous ones, due to a smaller multiplicative constant term.