Documentation

HexGraph.Sparse.Pack

@[inline]
def Hex.SparseGraph.packStep {α : Type u_1} (acc : Array Nat × Array α) (row : List α) :
Equations
Instances For
    def Hex.SparseGraph.pack {α : Type u_1} (rows : List (List α)) :

    Append each row directly to its final array, recording offsets in the same pass. No flattened intermediate list or row-length scan is needed.

    Equations
    Instances For
      theorem Hex.SparseGraph.pack_eq {α : Type u_1} (rows : List (List α)) :
      def Hex.SparseGraph.ofRowsFast {n : Nat} (rows : Vector (List (Fin n)) n) (hs : ∀ (i : Fin n), List.Pairwise (fun (x1 x2 : Fin n) => x1 < x2) rows[i]) (hr : ∀ (i j : Fin n), j ∈ rows[i] ↔ i ∈ rows[j]) (hl : ∀ (i : Fin n), ¬i ∈ rows[i]) :

      The checked graph constructor with direct array packing.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For