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
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.