instance
Aesop.instInhabitedUnionFind
{a✝ : Type u_1}
{a✝¹ : BEq a✝}
{a✝² : Hashable a✝}
:
Inhabited (Aesop.UnionFind a✝)
Equations
- Aesop.instInhabitedUnionFind = { default := { parents := default, sizes := default, toRep := default } }
Equations
- u.size = u.parents.size
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Aesop.UnionFind.addArray
{α : Type u_1}
[BEq α]
[Hashable α]
(xs : Array α)
(u : Aesop.UnionFind α)
:
Equations
- Aesop.UnionFind.addArray xs u = Array.foldl (fun (u : Aesop.UnionFind α) (x : α) => Aesop.UnionFind.add x u) u xs
Instances For
Equations
Instances For
Equations
- Aesop.UnionFind.find? x u = match u.toRep[x]? with | none => (none, u) | some rep => match Aesop.UnionFind.findRep✝ rep u with | (rep, u) => (some rep, u)
Instances For
@[implemented_by _private.Aesop.Util.UnionFind.0.Aesop.UnionFind.mergeUnsafe]
def
Aesop.UnionFind.sets
{α : Type v}
[BEq α]
[Hashable α]
(u : Aesop.UnionFind α)
:
Array (Array α) × Aesop.UnionFind α
Equations
- One or more equations did not get rendered due to their size.