graph_order 函数
返回无向边列表中的顶点数。
语法
GraphTheory:-Order(edges)graph_order(edges)
参数与选项
edges | 形如 [[u, v], ...] 的边列表。 |
|---|
示例
- 顶点数
GraphTheory:-Order([[a, b], [b, c], [c, a], [c, d]])返回 4。
返回无向边列表中的顶点数。
GraphTheory:-Order(edges)graph_order(edges)edges | 形如 [[u, v], ...] 的边列表。 |
|---|
GraphTheory:-Order([[a, b], [b, c], [c, a], [c, d]])返回 4。