Skip to content

Commit a218f13

Browse files
committed
Add health metrics
1 parent 3ff46e5 commit a218f13

File tree

4 files changed

+650
-0
lines changed

4 files changed

+650
-0
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4848

4949
- **ASCII Art Rendering** (`yog/render/ascii`): New module for rendering grids and mazes as ASCII text, ideal for terminal output and debugging.
5050

51+
- **Network Health Metrics** (`yog/health`): New module for measuring graph structural quality:
52+
- `diameter/5` - Maximum distance (worst-case reachability)
53+
- `radius/5` - Minimum eccentricity (best central point)
54+
- `eccentricity/6` - Maximum distance from a specific node
55+
- `assortativity/1` - Degree correlation (homophily vs heterophily)
56+
- `average_path_length/6` - Typical separation between nodes
57+
5158
- **Grid Distance Heuristics**: Added `chebyshev_distance` (for 8-way movement) and `octile_distance` (for realistic diagonal costs) to `yog/builder/grid`.
5259

5360
- **F# Comparison**: Added `GLEAM_FSHARP_COMPARISON.md` documenting feature parity, API differences, and migration guidance between the Gleam and F# implementations of Yog.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ A graph algorithm library for Gleam, providing implementations of classic graph
3535
- **Graph Visualization**: Mermaid, DOT (Graphviz), and JSON rendering
3636
- **Minimum Spanning Tree**: Kruskal's and Prim's algorithms with Union-Find and Priority Queues
3737
- **Minimum Cut**: Stoer-Wagner algorithm for global min-cut
38+
- **Network Health**: Diameter, radius, eccentricity, assortativity, average path length
3839
- **Directed Acyclic Graphs (DAG)**: Strictly-validated `Dag(n, e)` wrapper bringing O(V+E) DP routines like `longest_path` (Critical Path), LCA, and transitive structures
3940
- **Topological Sorting**: Kahn's algorithm with lexicographical variant, alongside guaranteed cycle-free DAG-specific sorts
4041
- **Strongly Connected Components**: Tarjan's and Kosaraju's algorithms

0 commit comments

Comments
 (0)