Skip to content

fix: BFS reports all requested root vertices instead of only the first#2693

Merged
schochastics merged 2 commits into
mainfrom
fix/bfs-docs-1639
Jun 5, 2026
Merged

fix: BFS reports all requested root vertices instead of only the first#2693
schochastics merged 2 commits into
mainfrom
fix/bfs-docs-1639

Conversation

@schochastics
Copy link
Copy Markdown
Contributor

Fixes #1639

schochastics and others added 2 commits June 5, 2026 09:00
When multiple roots are supplied, the C implementation only returns
the scalar `root` (always 0/1), which is meaningless. Now we preserve
and return all requested root vertices in the result.

Also improve documentation for the `root` parameter (multi-root behavior)
and clarify return value types for `order`, `parent`, `pred`, and `succ`.

Fixes #1639
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 63a486c is merged into main:

  • ✔️as_adjacency_matrix: 774ms -> 769ms [-2.01%, +0.87%]
  • ✔️as_biadjacency_matrix: 821ms -> 803ms [-7.46%, +3.1%]
  • ✔️as_data_frame_both: 1.53ms -> 1.59ms [-3.93%, +11.98%]
  • ✔️as_long_data_frame: 3.94ms -> 3.93ms [-1.09%, +0.53%]
  • ✔️es_attr_filter: 2.96ms -> 2.94ms [-3.01%, +1.43%]
  • ✔️graph_from_adjacency_matrix: 150ms -> 149ms [-4.32%, +2.37%]
  • ✔️graph_from_data_frame: 3.52ms -> 3.46ms [-4.93%, +1.41%]
  • ✔️vs_attr_filter: 1.72ms -> 1.72ms [-3.56%, +3.55%]
  • ✔️vs_by_name: 1.14ms -> 1.14ms [-3.38%, +3.5%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

@schochastics schochastics merged commit d2d5c70 into main Jun 5, 2026
1 check passed
@schochastics schochastics deleted the fix/bfs-docs-1639 branch June 5, 2026 09:46
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.

Breadth-first search documentation and output.

1 participant