UnionFind.Concurrent.make test requires OCaml 5.0.)union and merge.merge. It is now guaranteed that, if the user function f raises an exception, then the union-find data structure is unaffected.UnionFind and UnionFind.Make, introduce a new operation merge, a variant of union that is parameterized with a join function f. The function f is not allowed to perform reentrant accesses to the union-find data structure.UnionFind only, introduce an optimization that reduces the amount of memory allocation. This leads to a speed improvement of about 10% in the micro-benchmark.Incompatible changes in the signature STORE, which appears in the type of the functor UnionFind.Make.
copy operation is introduced, so a persistent store is now simulated by a mutable store that can be copied in constant time. The main motivation for this change is that it makes UnionFind.Make much more pleasant to use in practice.union is no longer parameterized with a join function f. This API was flawed and could lead to meaningless behavior if the function f provided by the user performed reentrant calls to the union-find algorithm.union now returns a reference of type 'a rref instead of a unit value. This makes UnionFind.Make analogous to UnionFind, which it was not.find among the operations offered by UnionFind.Make.is_representative to the operations offered by UnionFind and by UnionFind.Make.make test.find and eq functions, both in the basic union-find (UnionFind) and the one that is parameterized over a store (UnionFind.Make).