hegg-0.5.0.0: Fast equality saturation in Haskell
Safe HaskellNone
LanguageHaskell2010

Data.Equality.Graph.ReprUnionFind

Description

Union-find-like data structure that defines equivalence classes of e-class ids.

Synopsis

Documentation

data ReprUnionFind Source #

A union find for equivalence classes of e-class ids.

Instances

Instances details
Show ReprUnionFind Source # 
Instance details

Defined in Data.Equality.Graph.ReprUnionFind

makeNewSet Source #

Arguments

:: ReprUnionFind 
-> (ClassId, ReprUnionFind)

Newly created e-class id and updated ReprUnionFind

Create a new e-class id in the given ReprUnionFind.

unionSets Source #

Arguments

:: ClassId

E-class id a

-> ClassId

E-class id b

-> ReprUnionFind

Union-find containing a and b

-> (ClassId, ReprUnionFind)

The new leader (always a) and the updated union-find

Union operation of the union find.

Given two leader ids, unions the two eclasses making a the leader, that is, b is now represented by a

findRepr Source #

Arguments

:: ClassId 
-> ReprUnionFind 
-> ClassId

The found canonical representation

Find the canonical representation of an e-class id