Parallel Join Patterns with Guards and Propagation
A JoinList - a list type with with cheap catenation.
Generally speaking, joinlists have cheap construction (cons, snoc and join aka. append) and expensive manipulation. For most use-cases Data.Sequence is a more appropriate data structure.
* 3.0 - Added views as per Data.Sequence and takes and drops. Changed show instance to mimic Data.Sequence.
* 2.0 - more operations and some bugfixes (toList...), wrap renamed to singleton.
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.
Imperative ST/IO based disjoint set data structure.