Closed apriljunge closed 5 months ago
I think we already do have it! https://juliagraphs.org/MetaGraphsNext.jl/dev/api/#MetaGraphsNext.neighbor_labels-Tuple{MetaGraph,%20Any}
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.
Oh right, sorry I missed that. Feel free to open a PR adding it then!
Closed by #77
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?