DisjointSet

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.

Inheritors

Types

Link copied to clipboard
interface Partition<T> : Iterable<T>

Properties

Link copied to clipboard
abstract val elements: Int
Link copied to clipboard
abstract val partitions: Int

Functions

Link copied to clipboard
abstract fun add(x: T): DisjointSet.Partition<T>
Link copied to clipboard
Link copied to clipboard
abstract operator fun get(x: T): DisjointSet.Partition<T>?
Link copied to clipboard
abstract operator fun iterator(): Iterator<DisjointSet.Partition<T>>
Link copied to clipboard
Link copied to clipboard