graph_spanning_forest 函数
返回每个连通分量的一组广度优先生成树边。
语法
GraphTheory:-SpanningForest(edges)graph_spanning_forest(edges)
参数与选项
edges | 形如 [[u, v], ...] 的边列表。 |
|---|
示例
- 生成森林
GraphTheory:-SpanningForest([[a, b], [c, d]])返回 [[a, b], [c, d]]。
返回每个连通分量的一组广度优先生成树边。
GraphTheory:-SpanningForest(edges)graph_spanning_forest(edges)edges | 形如 [[u, v], ...] 的边列表。 |
|---|
GraphTheory:-SpanningForest([[a, b], [c, d]])返回 [[a, b], [c, d]]。