successors
後続ノード
説明
例
後続ノード
有向グラフを作成してプロットし、ノード 'a'
の後続ノードを求めます。
s = [1 1 1 2 2 3 3 7 8]; t = [2 3 4 5 6 7 8 5 5]; names = {'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h'}; G = digraph(s,t,[],names); plot(G)
sucIDs = successors(G,'a')
sucIDs = 3x1 cell
{'b'}
{'c'}
{'d'}
入力引数
出力引数
sucIDs
— 後続ノード ID
ノード インデックス | ノード名
後続ノード ID。ノード インデックスまたはノード名として返されます。
nodeID
が数値ノード インデックスの場合、sucIDs
は数値ノード インデックスを含みます。nodeID
がノード名の場合、sucIDs
はノード名を含みます。
ヒント
同じ 2 つのノード間に複数のエッジがある多重グラフでは、一部の後続ノードへの出方向エッジが複数存在する可能性があるため、
outedges
の出力がsuccessors
の出力より長くなる場合があります。
拡張機能
C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。
使用上の注意事項および制限事項:
ノード識別子
nodeID
は、入力グラフG
の数値のノード インデックスでなければなりません。ノード名はサポートされません。
バージョン履歴
R2015b で導入
参考
neighbors
| predecessors
| digraph
| outdegree
| outedges
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)