Crate disjoint_sets [] [src]

Three union-find implementations

The variants are:

  • UnionFind: An array-based union-find where clients represent elements as small unsigned integers.
  • UnionFindNode: A tree-based union-find where each set can have associated ata, and where clients represent elements as opaque tree nodes.
  • AUnionFind: Like UnionFind, but it’s Sync for sharing between threads.

All three perform rank-balanced path compression à la Tarjan, using interior mutability.

Structs

AUnionFind

Concurrent union-find representing a set of disjoint sets.

UnionFind

Array-based union-find representing a set of disjoint sets.

UnionFindNode

Tree-based union-find representing disjoint sets with associated data.

Traits

ElementType

A type that can be used as a union-find element.