diff --git a/Partition3.ml b/Partition3.ml index 04324f1..5932920 100644 --- a/Partition3.ml +++ b/Partition3.ml @@ -41,8 +41,8 @@ module Make (Item: Partition.Item) = let repr item partition = (seek item partition).item - let is_equiv (i: item) (j: item) (p: partition) = - equal (repr i p) (repr j p) + let is_equiv (i: item) (j: item) (p: partition) = + equal (repr i p) (repr j p) let get_or_set item (p: partition) = try seek item p, p with diff --git a/README.md b/README.md index b684c22..16c7b5b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ 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 programmning languages, so the representatives of +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 @@ -37,4 +37,3 @@ 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. - diff --git a/Version.ml b/Version.ml deleted file mode 100644 index 41bfb40..0000000 --- a/Version.ml +++ /dev/null @@ -1 +0,0 @@ -let version = "24f4693" diff --git a/dune b/dune new file mode 100644 index 0000000..8fe8caa --- /dev/null +++ b/dune @@ -0,0 +1,11 @@ +(library + (name UnionFind) + (public_name partition) + (wrapped false) + (modules Partition0 Partition1 Partition2 Partition3 Partition) + (modules_without_implementation Partition)) + +(test + (modules PartitionMain) + (libraries UnionFind) + (name PartitionMain)) diff --git a/dune-project b/dune-project new file mode 100644 index 0000000..43a1282 --- /dev/null +++ b/dune-project @@ -0,0 +1 @@ +(lang dune 1.7) diff --git a/partition.opam b/partition.opam new file mode 100644 index 0000000..58888bc --- /dev/null +++ b/partition.opam @@ -0,0 +1,19 @@ +opam-version : "2.0" +version : "1.0" +maintainer : "rinderknecht@free.fr" +authors : [ "Christian Rinderknecht" ] +homepage : "https://gitlab.com/rinderknecht/UnionFind" +bug-reports : "https://gitlab.com/rinderknecht/UnionFind/issues" +dev-repo : "git+https://gitlab.com/rinderknecht/UnionFind.git" +license : "MIT" + +depends : [ "dune" ] + +build : [ + [ "sh" "-c" "printf 'let version = \"%s\"' \"$(git describe --always --dirty --abbrev=0)\" > Version.ml" ] + [ "dune" "build" "-p" name "-j" jobs ] + ] + +url { + src: "https://gitlab.com/rinderknecht/UnionFind/-/archive/master/UnionFind.tar.gz" +}