Skip to content

refactor: decouple BFS, SSSP and TriangleCount from the quad-tree - #27

Merged
gsvgit merged 1 commit into
wowaster/mass-refactorfrom
wowaster/decoupling
Nov 16, 2026
Merged

gsvgit merged 1 commit into
wowaster/mass-refactorfrom
wowaster/decoupling

Conversation

@WoWaster

Copy link
Copy Markdown
Member

Each algorithm in Graph/ is now generic over the representation and takes a per-algorithm ops record (BfsOps, SsspOps, TriangleCountOps) holding exactly the vector/matrix operations it needs. Semiring operators stay in the algorithms. Error unions are generic over the inner error types.

Quad-tree instances and specialized entry points live in Graph/Impl/QuadTree/.fs; Graph/Impl/Default.fs re-exports them as Graph.Impl.Default.. Callers pick a representation via the open (open Graph.Impl.Default.BFS) and call bare names (bfsLevel g s).

Also: descriptive type parameter names ('edge, 'vertex, 'graphMat, 'countMat), Graph.BFS.IndexedMult to work around a Fantomas failure on the long vxmiValues field type, the FS3886 fix in SSSP, and AGENTS.md / TODO.md updates for the new conventions.

@WoWaster
WoWaster requested a review from gsvgit November 13, 2026 08:46
@WoWaster
WoWaster added this pull request to stack #23 November 13, 2026 08:46
@WoWaster
WoWaster force-pushed the wowaster/decoupling branch from cc986f8 to 68ef323 Compare November 13, 2026 18:06
Each algorithm in Graph/ is now generic over the representation and takes
a per-algorithm ops record (BfsOps, SsspOps, TriangleCountOps) holding
exactly the vector/matrix operations it needs. Semiring operators stay in
the algorithms. Error unions are generic over the inner error types.

Quad-tree instances and specialized entry points live in
Graph/Impl/QuadTree/<Alg>.fs; Graph/Impl/Default.fs re-exports them as
Graph.Impl.Default.<Alg>. Callers pick a representation via the open
(`open Graph.Impl.Default.BFS`) and call bare names (`bfsLevel g s`).

Also: descriptive type parameter names ('edge, 'vertex, 'graphMat,
'countMat), Graph.BFS.IndexedMult to work around a Fantomas failure on
the long vxmiValues field type, the FS3886 fix in SSSP, and AGENTS.md /
TODO.md updates for the new conventions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@gsvgit
gsvgit force-pushed the wowaster/decoupling branch from 68ef323 to e3b7309 Compare November 16, 2026 09:49
@gsvgit
gsvgit merged commit 81c5607 into main Nov 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants