Documentation

Batteries.Data.BinaryHeap.WF

def Batteries.BinaryHeap.WF.Children {α : Type u_1} {sz : Nat} [Ord α] (a : Vector α sz) (i : Fin sz) :

The primary local correctness property for the heap. A node should be >= both its children (if it has them).

Equations
Instances For
    def Batteries.BinaryHeap.WF.TopDown {α : Type u_1} {sz : Nat} [Ord α] (v : Vector α sz) :

    The vector underlying a BinaryHeap is well-formed iff every node is ≥ any children it has

    Equations
    Instances For
      def Batteries.BinaryHeap.WF {α : Type u_1} [Ord α] (heap : BinaryHeap α) :

      The well-formedness property of a binary heap

      Equations
      Instances For