Skip to content

fix: tiernan_all_cycles requires only a vertex_index map - #686

Merged
Becheler merged 2 commits into
boostorg:developfrom
Becheler:fix/issue-182-tiernan-vertex-index
Nov 1, 2026
Merged

Becheler merged 2 commits into
boostorg:developfrom
Becheler:fix/issue-182-tiernan-vertex-index

Conversation

@Becheler

@Becheler Becheler commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #182

Motivation

tiernan_all_cycles asserted VertexIndexGraphConcept, which requires renumber_vertex_indices(). Only directed_graph and undirected_graph provide that function, so the algorithm failed to compile for every other graph type, including adjacency_list. The algorithm never calls renumber_vertex_indices(). It only reads vertex indices.

What this PR does

Replaces the check with one that only requires a readable vertex_index map, which is what the documentation already states. tiernan_all_cycles now compiles for adjacency_list and any other graph with a vertex_index map. A new regression test runs the algorithm on an adjacency_list and expects two cycles.

Before submitting

  • I searched for an existing PR or issue covering the same change.
  • This PR targets the develop branch.
  • My contribution is licensed under the Boost Software License 1.0.

Kind of change

Tick exactly one. Each kind is reviewed differently, so mixing them in one PR makes the diff difficult to review (why).

  • Reformat (layout only, no token added or removed)
  • Refactor (no observable behavior change)
  • Behavior change (observable to users of the library)
  • No code change (documentation, build, CI, or tooling)

Change category

  • Bug fix
  • New algorithm or API addition
  • Deprecation or removal
  • Performance
  • Tests
  • Documentation
  • Build, CI, or tooling
  • Other (specify below)

@Becheler Becheler self-assigned this Oct 31, 2026
@Becheler Becheler added algorithm type of issue related to algorithms fix labels Oct 31, 2026
@Becheler
Becheler marked this pull request as ready for review October 31, 2026 23:57
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Boost dependency footprint vs develop (auto-generated).
PR run 41295751839 vs develop run 41229730759 (7844c670ac).

Header-inclusion weights (graph files pulling each direct dependency in):

No header-inclusion-weight changes.

Transitive Boost modules: 47 → 47 (0)

@Becheler
Becheler force-pushed the fix/issue-182-tiernan-vertex-index branch from b7f5a1b to 5e6e456 Compare November 1, 2026 00:17
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Compiler-warning counts vs develop (auto-generated).
PR run 41295751841 vs develop run 41229730419 (7844c670ac).

Job Baseline After Delta
macos (clang, 14) 260 260 0
macos (clang, 17) 259 259 0
macos (clang, 20) 259 259 0
ubuntu (clang-19, 14) 260 260 0
ubuntu (clang-19, 17) 259 259 0
ubuntu (clang-19, 20) 259 259 0
ubuntu (clang-19, 23) 259 259 0
ubuntu (gcc-14, 14) 361 361 0
ubuntu (gcc-14, 17) 357 357 0
ubuntu (gcc-14, 20) 357 357 0
ubuntu (gcc-14, 23) 357 357 0
windows_msvc_14_3 (msvc-14.3) 961 955 -6

@codecov

codecov Bot commented Nov 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Becheler
Becheler merged commit 9021bb2 into boostorg:develop Nov 1, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

algorithm type of issue related to algorithms fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tiernan_all_cycles doesn't work out of the box with adjacency_list

1 participant