All edges attached to given node in a (di)graph
1 回表示 (過去 30 日間)
古いコメントを表示
I have a simple and, I imagine, common question about working with graphs. Is there a built-in way to find all the edges pointing into and out of a given node. I can use this
outgoing = findedge(G,1,successors(G,1));
incoming = findedge(G,1,predecessors(G,1));
but I would think there's something built in.
1 件のコメント
Sindhu Priya
2017 年 2 月 14 日
I am not aware if there is a built in function for finding the predecessor and successor edges of a digraph.
Regards,
Sindhu
回答 (1 件)
Christine Tobler
2017 年 2 月 21 日
There is currently no builtin for this, your lines with findedge are the simplest way to get the edge indices.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Graph and Network Algorithms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!