Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.

Commit 14038ad

Browse files
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/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,5 @@ jobs:
6262
gvisual.ShortestPathFinderTest \
6363
gvisual.GraphMLExporterTest \
6464
gvisual.CommunityDetectorTest \
65-
gvisual.NodeCentralityAnalyzerTest
65+
gvisual.NodeCentralityAnalyzerTest \
66+
gvisual.ArticulationPointAnalyzerTest

0 commit comments

Comments
 (0)