@ -3,9 +3,10 @@ package dev.openrs2.util.collect
interface DisjointSet<T> : Iterable<DisjointSet.Partition<T>> {
interface Partition<T> : Iterable<T>
val elements: Int
val partitions: Int
fun add(x: T): Partition<T>
operator fun get(x: T): Partition<T>?
fun union(x: Partition<T>, y: Partition<T>)
fun elements(): Int
fun partitions(): Int
}
@ -154,12 +154,12 @@ public final class ForestDisjointSet<T> implements DisjointSet<T> {
@Override
public int elements() {
public int getElements() {
return elements;
public int partitions() {
public int getPartitions() {
return partitions;