Releases: SMC17/zig-graph
Release list
zig-graph v1.2.0 — coverage-measured
v1.1.0 — Full centrality / spectral / community / traversal API
The seven algorithms the original v0.1.0 README listed as out-of-scope are now all implemented.
Note on version chronology:
v1.0.0(also dated 2026-05-13) shipped earlier the same day as a hygiene-only milestone (CI / SECURITY / contributor docs / API freeze statement). This release is the first to ship the genuine algorithmic v1.0 content. Bumped tov1.1.0to preserve the already-publishedv1.0.0tag rather than rewrite history.
Added
betweennessCentrality— Brandes 2001 algorithm. BFS path forunweighted = true(O(V·E)); Dijkstra path otherwise. Optional[0, 1]normalisation.closenessCentrality— Wasserman-Faust normalised closeness. Handles disconnected components.fiedlerValue/fiedlerVector/fiedler— algebraic connectivity (second-smallest Laplacian eigenvalue) via deflated power iteration onM = τI − Lwithτ = 2·max_deg + 1. O(V + E) per iteration. Validated against closed-form λ₁ forPₙ,Cₙ,K₁,ₙ₋₁,Kₙ, and a barbell reference.louvain/modularity— Blondel et al. 2008 modularity-maximising community detection. Returns labels, community count, and Newman modularityQ.directedPagerank— directed-edge PageRank respecting edge direction; sinks redistribute mass uniformly.bfs/dfs/sssp/bfsPath— foundational traversal helpers.buildAdjacency/buildDirectedAdjacency— CSR-style adjacency construction exposed as public API.
Changed
- Test count: 16 → 50. Includes three new random-graph fuzz harnesses (betweenness non-negativity + upper bound; Fiedler spectral bound; Louvain modularity ∈ [-0.5, 1]).
- Source factored into
src/{traversal, centrality, spectral, community}.zigwithsrc/root.zigas the re-export hub. Existing API preserved verbatim — purely additive. - Minimum Zig:
0.15.0→0.16.0.
Bench numbers (i7-1065G7 @ 1.30 GHz, busy laptop, ±2× variance)
Louvain modularity on 1k-node ER sparse graph: Q ≈ 0.33 across 16 communities. Fiedler λ₁ ≈ 0 on 10k-node disconnected ER graph (correct — k components → k zero eigenvalues).
Out of scope for this release
Honest list of what is not implemented: Leiden refinement, parallel-edge merging at construction time, hypergraphs, ILP-optimal community detection, CSR caching at the Graph level, GPU offload. Each is documented in the README with reasoning.
PRs welcome — the bar is "correctness against canonical small examples + invariant fuzz + benchmark on a medium graph".
v1.0.0 — Production-Grade Hygiene Milestone
v1.0.0 — 2026-05-13
Production-grade hygiene milestone.
- LICENSE, README, CONTRIBUTING, SECURITY, CI all present.
- Repo declared at v1.x milestone: existing surface stable; breaking changes bump to v2.x.
- Engineering posture: Virgil work-in-progress convention adapted for OSS — v1.0 means we stand behind the existing surface; v1.x patches refine without breaking.
See CHANGELOG.md for full context.
zig-graph v0.1.0 — initial release
Initial release. See CHANGELOG.md for details. Cross-validated tests, CI, runnable example, MIT license. Minimum Zig: 0.16.0.
