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

perf: optimize DominatingSetAnalyzer — frontier-based CDS, O(D·deg) validation - #133

Merged
sauravbhattacharya001 merged 1 commit into
masterfrom
perf/dominating-set-optimizations
Mar 30, 2026
Merged

sauravbhattacharya001 merged 1 commit into
masterfrom
perf/dominating-set-optimizations

Conversation

@sauravbhattacharya001

Copy link
Copy Markdown
Owner

Changes

isDominatingSet

  • Before: O(V·D) — for each non-member vertex, iterate all candidates checking adjacency
  • After: O(D·avg_degree) — build dominated set from candidate closed neighborhoods, check size

coverageMap

  • Before: O(V·D) — for each vertex, iterate all dominators checking adjacency
  • After: O(D·avg_degree) — iterate each dominator's neighborhood, increment counters

connectedDominatingSet

  • Before: O(V·|CDS|) per round — scan all vertices, check adjacency to any CDS member via O(|CDS|) loop
  • After: O(|frontier|·avg_degree) per round — maintain frontier set of CDS-adjacent vertices, O(1) connectivity

…overage and validation

- isDominatingSet: build dominated set from candidate neighborhoods O(D·avg_deg) instead of checking each vertex against all candidates O(V·D)
- coverageMap: iterate dominator neighborhoods O(D·avg_deg) instead of iterating all dominators per vertex O(V·D)
- connectedDominatingSet: maintain frontier set of CDS-adjacent vertices so connectivity check is O(1) instead of O(|CDS|) per candidate, and candidate search is limited to frontier instead of all vertices
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added visualization Graph visualization and UI size/m labels Mar 28, 2026
@sauravbhattacharya001
sauravbhattacharya001 merged commit eea4913 into master Mar 30, 2026
4 of 8 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size/m visualization Graph visualization and UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant