equivalence

Maintaining an equivalence relation implemented as union-find using STT.

https://github.com/pa-ba/equivalence

LTS Haskell 23.18:0.4.1
Stackage Nightly 2025-04-11:0.4.1
Latest on Hackage:0.4.1

See all snapshots equivalence appears in

BSD-3-Clause licensed by Patrick Bahr
Maintained by Andreas Abel
This version can be pinned in stack with:equivalence-0.4.1@sha256:0edb9853a870f4bf98614f555e2bdc35360c197dd6f6685774fc97fe9ecd4480,2503

Module documentation for 0.4.1

This is an implementation of Tarjan's Union-Find algorithm (Robert E. Tarjan. "Efficiency of a Good But Not Linear Set Union Algorithm", JACM 22(2), 1975) in order to maintain an equivalence relation. This implementation is a port of the union-find package using the ST monad transformer (instead of the IO monad).

Changes