úÎ"k     None2468BHM A node in a disjoint set forest.!An immutable disjoint set forest.None 23468BHM JA disjoint set forest, with nodes numbered from 0, which can carry labels.  Analogous to .  Analogous to  4Create a new disjoint set forest, of given capacity. —Grow the capacity of a disjoint set forest. Shrinking is not possible. Trying to shrink a disjoint set forest will return the same forest unmodified.Copy a disjoint set forest.!Annotate a node with a new label. +Look up the representative of a given node.lookup' does path compression.9Look up the representative of a given node and its label.!,Check whether two nodes are in the same set.€Merge two nodes if they are in distinct equivalence classes. The passed function is used to combine labels, if a merge happens.2Flatten a disjoint set forest, for faster lookups."#$% & ' !     "#$% & ' !None2468BHM#Add a new node, with a given label.7Find the node representing a given node, and its label.áMerge two sets. The first argument is a function that takes the labels of the corresponding sets' representatives and computes a new label for the joined set. Returns Nothing if the given nodes are in the same set already.Re-label a node.3Flatten the disjoint set forest for faster lookups.((None2468BHMUnion find monad.Run a union find computation.VRun a union find computation; also return the final disjoint set forest for querying.)*+,-./0123 )*+,-./0123None2468BHM&Get the number of nodes in the forest.4Look up the representative of a node, and its label. Version of 0 that assumes the forest to be flattened. (cf.  .)1Do not use otherwise: It will give wrong results!4           !"#$%&'(()*+,-./0union-find-array-0.1.0.2Data.Union.Type Data.Union.STControl.Monad.Union.ClassControl.Monad.Union Data.UnionData.Array.Base unsafeFreezeControl.Union.STflattenNodefromNodeUnionsizeuplabelUnionST runUnionSTnewgrowcopyannotatelookupmerge MonadUnionUnionMrunrun'lookupFlattened array-0.5.0.0 Data.Array.ST runSTArraylookup'equalsrankdefgrow'$fMonadUnionltUrunUUStatenextforest$fMonadUnionlUnionM$fMonadFixUnionM$fApplicativeUnionM$fFunctorUnionM $fMonadUnionM