úÎ!m     None!A node in a disjoint set forest. "An immutable disjoint set forest. None KA disjoint set forest, with nodes numbered from 0, which can carry labels.  Analogous to .  Analogous to  5Create a new disjoint set forest, of given capacity. GGrow the capacity of a disjoint set forest. Shrinking is not possible. D 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. :Look up the representative of a given node and its label. !-Check whether two nodes are in the same set. AMerge two nodes if they are in distinct equivalence classes. The @ passed function is used to combine labels, if a merge happens. 3Flatten a disjoint set forest, for faster lookups. "#$% & ' !     "#$% & ' !None$Add a new node, with a given label. 8Find the node representing a given node, and its label. GMerge two sets. The first argument is a function that takes the labels  of the corresponding sets'. representatives and computes a new label for H the joined set. Returns Nothing if the given nodes are in the same set  already. Re-label a node. 4Flatten the disjoint set forest for faster lookups. ((NoneUnion find monad. Run a union find computation. HRun a union find computation; also return the final disjoint set forest  for querying. )*+,-./0123 )*+,-./0123None'Get the number of nodes in the forest. 5Look up the representative of a node, and its label.  Version of * that assumes the forest to be flattened.  (cf.  .) 2Do not use otherwise: It will give wrong results! 4           !"#$%&'(()*+,-./0union-find-array-0.1Data.Union.Type Data.Union.STControl.Monad.Union.ClassControl.Monad.Union Data.UnionData.Array.Base unsafeFreezeControl.Union.STflattenNodefromNodeUnionsizeuplabelUnionST runUnionSTnewgrowcopyannotatelookupmerge MonadUnionUnionMrunrun'lookupFlattened array-0.4.0.1 Data.Array.ST runSTArraylookup'equalsrankdefgrow'$fMonadUnionltUrunUUStatenextforest$fMonadUnionlUnionM$fMonadFixUnionM$fApplicativeUnionM$fFunctorUnionM $fMonadUnionM