Relabel by the bijection from new vertices to old vertices. Neighbours are mapped by its inverse and sorted, without a dense adjacency matrix.
Equations
- G.relabel p = Hex.SparseGraph.ofRows (Vector.ofFn fun (i : Fin n) => Hex.SparseGraph.Builder.mapRow (G.nbrs (p.get i)) p.inv.get) ⋯ ⋯ ⋯
Instances For
The packed storage length is the sum of the row lengths.
@[simp]