inductive Lean.PersistentHashMap.Entry (α : Type u) (β : Type v) (σ : Type w) :
Type (max (max u v) w)
- entry {α : Type u} {β : Type v} {σ : Type w} (key : α) (val : β) : Entry α β σ
- ref {α : Type u} {β : Type v} {σ : Type w} (node : σ) : Entry α β σ
- null {α : Type u} {β : Type v} {σ : Type w} : Entry α β σ
Instances For
@[instance_reducible]
Equations
@[instance_reducible]
Equations
@[reducible, inline]
Equations
Instances For
@[reducible, inline]
Instances For
@[reducible, inline]
Equations
Instances For
@[reducible, inline]
Equations
Instances For
Equations
Instances For
Equations
Instances For
@[instance_reducible]
instance Lean.PersistentHashMap.instInhabited {α : Type u_1} {β : Type u_2} [BEq α] [Hashable α] :
Inhabited (PersistentHashMap α β)
Equations
Instances For
@[reducible, inline]
Equations
- Lean.PersistentHashMap.mul2Shift i shift = i.shiftLeft shift
Instances For
@[reducible, inline]
Equations
- Lean.PersistentHashMap.div2Shift i shift = i.shiftRight shift
Instances For
@[reducible, inline]
Equations
- Lean.PersistentHashMap.mod2Shift i shift = i.land (USize.shiftLeft 1 shift - 1)
Instances For
- mk {α : Type u_1} {β : Type u_2} (keys : Array α) (vals : Array β) (h : keys.size = vals.size) : IsCollisionNode (Node.collision keys vals h)
Instances For
@[reducible, inline]
Equations
Instances For
- mk {α : Type u_1} {β : Type u_2} (entries : Array (Entry α β (Node α β))) : IsEntriesNode (Node.entries entries)
Instances For
@[reducible, inline]
Equations
Instances For
partial def Lean.PersistentHashMap.insertAtCollisionNodeAux {α : Type u_1} {β : Type u_2} [BEq α] :
CollisionNode α β → Nat → α → β → CollisionNode α β
def Lean.PersistentHashMap.insertAtCollisionNode {α : Type u_1} {β : Type u_2} [BEq α] :
CollisionNode α β → α → β → CollisionNode α β
Equations
Instances For
def Lean.PersistentHashMap.getCollisionNodeSize {α : Type u_1} {β : Type u_2} :
CollisionNode α β → Nat
Equations
- Lean.PersistentHashMap.getCollisionNodeSize ⟨Lean.PersistentHashMap.Node.collision keys vs h, property⟩ = keys.size
Instances For
def Lean.PersistentHashMap.mkCollisionNode {α : Type u_1} {β : Type u_2} (k₁ : α) (v₁ : β) (k₂ : α) (v₂ : β) :
Node α β
Equations
- One or more equations did not get rendered due to their size.
Instances For
def Lean.PersistentHashMap.insert {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} :
PersistentHashMap α β → α → β → PersistentHashMap α β
Equations
Instances For
def Lean.PersistentHashMap.find? {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} :
PersistentHashMap α β → α → Option β
Instances For
@[instance_reducible]
instance Lean.PersistentHashMap.instGetElemOptionTrue {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} :
GetElem (PersistentHashMap α β) α (Option β) fun (x : PersistentHashMap α β) (x_1 : α) => True
Equations
- Lean.PersistentHashMap.instGetElemOptionTrue = { getElem := fun (m : Lean.PersistentHashMap α β) (i : α) (x : True) => m.find? i }
@[inline]
def Lean.PersistentHashMap.find! {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} [Inhabited β] (m : PersistentHashMap α β) (a : α) :
β
Equations
Instances For
def Lean.PersistentHashMap.findEntry? {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} :
PersistentHashMap α β → α → Option (α × β)
Equations
- { root := root }.findEntry? x✝ = Lean.PersistentHashMap.findEntryAux root (hash x✝).toUSize x✝
Instances For
@[inline]
def Lean.PersistentHashMap.findKeyD {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} (m : PersistentHashMap α β) (a a₀ : α) :
α
A more efficient m.findEntry? a |>.map (·.1) |>.getD a₀
Instances For
def Lean.PersistentHashMap.contains {α : Type u_1} {β : Type u_2} [BEq α] [Hashable α] :
PersistentHashMap α β → α → Bool
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.PersistentHashMap.isUnaryNode (Lean.PersistentHashMap.Node.entries entries) = Lean.PersistentHashMap.isUnaryEntries entries 0 none
Instances For
def Lean.PersistentHashMap.erase {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} :
PersistentHashMap α β → α → PersistentHashMap α β
Equations
Instances For
@[inline]
def Lean.PersistentHashMap.alter {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} :
PersistentHashMap α β → α → (Option β → Option β) → PersistentHashMap α β
Equations
Instances For
def Lean.PersistentHashMap.foldlM {m : Type w → Type w'} [Monad m] {σ : Type w} {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} (map : PersistentHashMap α β) (f : σ → α → β → m σ) (init : σ) :
m σ
Equations
- map.foldlM f init = Lean.PersistentHashMap.foldlMAux f map.root init
Instances For
@[implemented_by _private.Lean.Data.PersistentHashMap.0.Lean.PersistentHashMap.foldlNewEntriesUnsafe]
def Lean.PersistentHashMap.foldlNewEntries {σ : Type w} {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} (f : σ → α → β → σ) (new old : PersistentHashMap α β) (init : σ) :
σ
Folds f over the entries of new whose keys are not in old, in the order of foldl. If new
was derived from old by insertions, the cost is proportional to the number of insertions rather
than to the size of new.
Equations
Instances For
def Lean.PersistentHashMap.forIn {m : Type w → Type w'} {σ : Type w} {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} [Monad m] (map : PersistentHashMap α β) (init : σ) (f : α × β → σ → m (ForInStep σ)) :
m σ
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]
instance Lean.PersistentHashMap.instForInProdOfMonad {m : Type w → Type w'} {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} [Monad m] :
ForIn m (PersistentHashMap α β) (α × β)
Equations
- Lean.PersistentHashMap.instForInProdOfMonad = { forIn := fun {β_1 : Type ?u.4} => Lean.PersistentHashMap.forIn }
def Lean.PersistentHashMap.mapM {α : Type u} {β : Type v} {σ : Type u} {m : Type u → Type w} [Monad m] {x✝ : BEq α} {x✝¹ : Hashable α} (pm : PersistentHashMap α β) (f : β → m σ) :
m (PersistentHashMap α σ)
Instances For
def Lean.PersistentHashMap.map {α : Type u} {β : Type v} {σ : Type u} {x✝ : BEq α} {x✝¹ : Hashable α} (pm : PersistentHashMap α β) (f : β → σ) :
Instances For
def Lean.PersistentHashMap.stats {α : Type u_1} {β : Type u_2} {x✝ : BEq α} {x✝¹ : Hashable α} (m : PersistentHashMap α β) :
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[instance_reducible]