此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.2)

VertexList

VertexList[g]
gives a list of all vertices in the graph g.
  • VertexList returns a list of vertices of the graph g.
  • For graphs specified using a rule list, the list of vertices are returned in the order in which they first appear.
Needs["GraphUtilities`"]
The list of vertices of a simple graph:
In[2]:=
Click for copyable input
Out[2]=
The list of vertices of a graph specified by an adjacency matrix consists of consecutive integers:
In[3]:=
Click for copyable input
Out[3]=