Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add all_neighbor_labels function #76

Closed
apriljunge opened this issue Mar 12, 2024 · 4 comments
Closed

add all_neighbor_labels function #76

apriljunge opened this issue Mar 12, 2024 · 4 comments

Comments

@apriljunge
Copy link
Contributor

In Graphs.jl the all_neighbors function returns in- and outneighbors for all graphs. This is especially needed for directed graphs. (Docs).

I think it would be nice to have a corresponding function like all_neighbor_labels in this package. Implementation should be straight forward like in Graphs.jl.

What do you think?

@gdalle
Copy link
Member

gdalle commented Mar 13, 2024

@apriljunge
Copy link
Contributor Author

This only works für undirected Graphs. For directed graphs neighbor_labels just returns labels of out neighbors. This is expected behaviour, because it relies on Graphs.neighbors. From the docomentation of Graphs.jl for Graphs.neighbors:

For directed graphs, the default is equivalent to outneighbors; use all_neighbors to list inbound and outbound neighbors.

This is why I think all_neighbor_labels is still needed to get in- and outbound neighbors on directed graphs.

@gdalle
Copy link
Member

gdalle commented Mar 13, 2024

Oh right, sorry I missed that. Feel free to open a PR adding it then!

gdalle pushed a commit that referenced this issue Mar 18, 2024
* Add all_neighbor_labels function

Solves #76

* Change all_neighbor_labels test to be independent of order

---------

Co-authored-by: Gregor Wehrle <g.wehrle@tu-braunschweig.de>
@gdalle
Copy link
Member

gdalle commented Mar 25, 2024

Closed by #77

@gdalle gdalle closed this as completed Mar 25, 2024
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

No branches or pull requests

2 participants