core :: DisjointSet :: to_partitions
var s = new DisjointSet[Int]
s.add_all([1,2,3,4,5,6])
s.union(1,2)
s.union(1,3)
s.union(4,5)
var p = s.to_partitions
assert p.length == 3
# Construct the current partitionning
#
# var s = new DisjointSet[Int]
# s.add_all([1,2,3,4,5,6])
# s.union(1,2)
# s.union(1,3)
# s.union(4,5)
# var p = s.to_partitions
# assert p.length == 3
fun to_partitions: Collection[Set[E]]
do
return to_subpartition(self)
end
lib/core/collection/union_find.nit:161,2--173,4