This repository was archived by the owner on Jun 18, 2026. It is now read-only.
Commit 14038ad
committed
feat: add Articulation Point & Bridge Analyzer
Finds critical nodes (cut vertices) and edges (bridges) whose removal
would disconnect the graph, using Tarjan's O(V+E) DFS algorithm.
Analysis features:
- Articulation point detection via DFS discovery/low-link values
- Bridge detection (edges where low[v] > disc[u])
- Per-articulation-point details: degree, edge type breakdown,
biconnected component count, criticality score
- Per-bridge details: endpoint component sizes after removal,
severity score (0-1, how imbalanced the split would be)
- Network resilience score (0-100) based on AP and bridge density
- Vulnerability classification: ROBUST/MODERATE/VULNERABLE/FRAGILE/CRITICAL
- Handles disconnected graphs (runs DFS from each component)
- All results sorted by criticality/severity (most critical first)
- Immutable result collections
UI integration (Main.java):
- New "Articulation Points & Bridges" panel in right sidebar
- Analyze/Clear buttons with resilience score, summary, and details
- Visual highlighting: cut vertices enlarged and colored red-orange,
bridge edges drawn with thick dashed red-orange stroke
- Integrated into vertex/edge paint, shape, and stroke transformers
48 new JUnit tests covering: empty/trivial graphs, triangle (no APs),
linear chain (all bridges), bridge between triangles, star topology,
complete graph K4, disconnected components, isolated vertices, diamond,
cycle, butterfly graph, mixed edge types, component sizes, severity
ordering, criticality sorting, biconnected components, resilience
scoring, vulnerability levels, percentage calculation, summary text,
result immutability.
CI updated: ArticulationPointAnalyzerTest added to workflow.1 parent c92e223 commit 14038ad
4 files changed
Lines changed: 1133 additions & 4 deletions
File tree
- .github/workflows
- Gvisual
- src/gvisual
- test/gvisual
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
0 commit comments