MathTop

graph_order 函数

返回无向边列表中的顶点数。

语法

  • GraphTheory:-Order(edges)
  • graph_order(edges)

参数与选项

edges形如 [[u, v], ...] 的边列表。

示例

  1. 顶点数GraphTheory:-Order([[a, b], [b, c], [c, a], [c, d]])返回 4。