@hackage union-find0.2
Efficient union and equivalence testing of sets.
Categories
License
BSD-3-Clause
Maintainer
Thomas Schilling <nominolo@googlemail.com>
Links
Versions
Installation
Dependencies (3)
- base >=4.4 && <4.17
- containers >=0.3
- transformers >=0.2 Show all…
Dependents (4)
@hackage/acme-everything, @hackage/elm-compiler, @hackage/libgraph, @hackage/Elm
union-find
A simple Haskell library that implements Tarjan's Union/Find algorithm. Useful, for example, to implement unification in a type inference system.
The Union/Find algorithm implements these operations in (effectively) constant-time:
-
Check whether two elements are in the same equivalence class.
-
Create a union of two equivalence classes.
-
Look up the descriptor of the equivalence class.
Installation
Using cabal (which comes with the Haskell Platform):
$ cabal install union-find
or in the checked-out repository:
$ cabal install