Skip to content

feat(cat5): representative cycles alongside Betti-1#39

Open
jphein wants to merge 1 commit into
M0nkeyFl0wer:mainfrom
techempower-org:feat/cat5-representative-cycles
Open

feat(cat5): representative cycles alongside Betti-1#39
jphein wants to merge 1 commit into
M0nkeyFl0wer:mainfrom
techempower-org:feat/cat5-representative-cycles

Conversation

@jphein
Copy link
Copy Markdown
Contributor

@jphein jphein commented May 25, 2026

Summary

Closes #16.

  • Adds representative_cycles: list[list[str]] to GapDetectionReport — up to 10 shortest cycles from nx.cycle_basis() on the largest component's undirected projection
  • Sorted by length then alphabetically for deterministic output
  • format_report() renders cycles when present (e.g., A → B → C → A)
  • Only computed when run_homology=True and the largest component has edges; zero cost when skipped

Test plan

  • test_representative_cycles — verifies cycle count and node membership against fixture
  • test_format_report_shows_cycles — verifies rendered output contains cycle arrow notation
  • Existing Cat 5 tests pass unchanged

🫏 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 25, 2026 01:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@M0nkeyFl0wer
Copy link
Copy Markdown
Owner

Ship. Representative cycles from nx.cycle_basis() on the largest component is the right scoping — Betti-1 alone tells you "there are N holes" but not "where to look," and the top-10 shortest cycles is the actionable form. Deterministic sort handles the reproducibility piece. Clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cat 5 — surface representative cycles for Betti-1 holes

3 participants