package dev.openrs2.util.collect /** * A data structure containing a set of elements partitioned into a number of * non-overlapping subsets. New elements belong to singleton subsets. The * [union] function combines two subsets together into a single larger subset. */ interface DisjointSet : Iterable> { interface Partition : Iterable val elements: Int val partitions: Int fun add(x: T): Partition operator fun get(x: T): Partition? fun union(x: Partition, y: Partition) }