-
Notifications
You must be signed in to change notification settings - Fork 2
GraphBrew Running Example
One nine-vertex graph is carried through the complete composition pipeline:
- load graph and CSR;
- attach community membership;
- place contiguous community blocks;
- order vertices inside each block;
- validate and emit the relabeled CSR; and
- inspect the resulting property-access locality.
The C0/C1 partition is fixed pedagogically so every mapping and CSR value
is checkable. The example illustrates composition; it is not a performance
result or the detector’s measured output on this tiny graph.
Tracked vertex v2 reads neighbors [1,4,6,8]. No labels have moved.
The example fixes:
C0 = {1,2,4,6,7}
C1 = {0,3,5,8}
Topology and vertex IDs remain unchanged.
comm_size_desc assigns C0 to IDs 0..4 and C1 to IDs 5..8.
The small fixture uses gordf4 only to place its two communities on opposite
sides of one local-layout decision:
intra_gorder is GraphBrew’s historical direct-neighbor local heuristic. It
is distinct from faithful standalone GORDER_csr.
For C0, v2 is the highest-degree root and receives local ID zero.
The final order is:
[v2,v1,v4,v6,v7 | v8,v5,v0,v3]
The permutation is bijective and preserves all 24 directed arcs.
For one-pass BFS compositions, Compact-and-Emit can build the same selected permutation while scheduling active community IDs only and writing final IDs during traversal.
The tracked neighbor IDs become [1,2,3,5], reducing the illustrative
four-property access from three cache lines to two.
| Quantity | Value |
|---|---|
| input order | [v0,v1,v2,v3,v4,v5,v6,v7,v8] |
| block-only SizeDesc order | [v1,v2,v4,v6,v7,v0,v3,v5,v8] |
C0 local BFS order |
[v2,v1,v4,v6,v7] |
C1 relaxed-Gorder order |
[v8,v5,v0,v3] |
| final order | [v2,v1,v4,v6,v7,v8,v5,v0,v3] |
| old-to-new map | [7,1,0,8,2,6,3,4,5] |
| relabeled row 0 | [1,2,3,5] |
Regenerate every public figure with:
python3 scripts/generate_public_figures.py
python3 scripts/generate_public_figures.py --check