Persistent disjoint-sets, a.k.a union-find. https://github.com/maxwellsayles/disjoint-set

Latest on Hackage:0.2

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD3 licensed by Maxwell Sayles, Myles Maxfield
Maintained by <maxwellsayles@gmail.com>,

This is a persistent data structure for disjoint sets.

The algorithm is described in "Introduction to Algorithms" by Cormen, et al. The implementation here uses both union by rank and path compression. We incur an O(logn) overhead because of the use of persistent maps.

Data.IntDisjointSet is as strict as possible.

Used by 1 package:
comments powered byDisqus