Skip to content

Add get_predecessors to Graph API#304

Open
mccakit wants to merge 1 commit intobobluppes:mainfrom
mccakit:pr0
Open

Add get_predecessors to Graph API#304
mccakit wants to merge 1 commit intobobluppes:mainfrom
mccakit:pr0

Conversation

@mccakit
Copy link
Copy Markdown
Contributor

@mccakit mccakit commented Mar 9, 2026

This PR adds get_predecessors as the inverse of get_neighbors to retrieve all vertices pointing to a given ID. In undirected graphs, it simply redirects to get_neighbors to maintain symmetry, while in directed graphs, it scans the adjacency list for incoming edges. This provides a complete API for bidirectional graph traversal without requiring a second adjacency list.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hi there! Thank you for creating your first pull-request on the Graaf library :)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Marking this PR as stale. It will not be automatically closed.

Even though the maintainers of Graaf may not always have time to take a look in a timely fashion, your contributions are much appreciated.
Please allow some time for @bobluppes to take a closer look.

@github-actions github-actions bot added the stale label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant