#
# s.add(3)
# assert not s.in_same_subset(1,3)
# s.union(3,2)
# assert s.in_same_subset(1,3)
#
#
# s.add(3)
# assert not s.in_same_subset(1,3)
# s.union(3,2)
# assert s.in_same_subset(1,3)
#
-# Unkike theorical Disjoint-set data structures, the underling implementation is opaque
-# that makes the traditionnal `find` method unavailable for clients.
+# Unlike theoretical Disjoint-set data structures, the underling implementation is opaque
+# making the traditional `find` method unavailable for clients.
# The methods `in_same_subset`, `to_partitions`, and their variations are offered instead.
class DisjointSet[E]
super SimpleCollection[E]
# The methods `in_same_subset`, `to_partitions`, and their variations are offered instead.
class DisjointSet[E]
super SimpleCollection[E]
#
# var s = new DisjointSet[Int]
# s.add_all([1,2,3,4,5,6])
#
# var s = new DisjointSet[Int]
# s.add_all([1,2,3,4,5,6])
# The term rank is used instead of depth since
# path compression is used, see `DisjointSet::nfind`
var rank = 0
# The term rank is used instead of depth since
# path compression is used, see `DisjointSet::nfind`
var rank = 0