Yog.FSharp
Getting Started Examples API Reference GitHub

DisjointSet<'a> Type

Disjoint Set Union (Union-Find) data structure.

Efficiently tracks a partition of elements into disjoint sets. Uses path compression and union by rank for near-constant time operations.

Time Complexity: O(α(n)) amortized per operation, where α is the inverse Ackermann function (effectively constant for all practical purposes, less than 5 for 2^65536 elements).

Record fields

Record Field Description

Parents

Full Usage: Parents

Field type: Map<'a, 'a>
Field type: Map<'a, 'a>

Ranks

Full Usage: Ranks

Field type: Map<'a, int>
Field type: Map<'a, int>