Mathematica > Mathematics and Algorithms > Graphs & Networks > Graph Representation and Properties > VertexList >
Mathematica > Visualization and Graphics > Graphs & Networks > Graph Representation and Properties > VertexList >

VertexList

VertexList[g]
gives the list of vertices for the graph g.
VertexList
gives a list of vertices that match the pattern patt.
  • VertexList returns the list of vertices in the order used by the graph g.
The vertex list for an explicitly constructed graph:
The vertex list for a parametrically constructed graph:
Find all vertices that match a pattern:
The vertex list for an explicitly constructed graph:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
The vertex list for a parametrically constructed graph:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
Find all vertices that match a pattern:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
VertexList works with undirected graphs:
Directed graphs:
Use patterns to select a subset of vertices:
Works with large graphs:
Find all vertices with a given property:
Highlight the vertex by the vertex degree:
VertexCount can be found using VertexList:
VertexIndex gives the position of a vertex in VertexList:
Use VertexQ to test if a vertex is a member of VertexList:
Vertices are taken in the order they appear in the list of edges:
The order can be modified with an explicit vertex list:
Rows and columns of the adjacency matrix follow the order given by VertexList:
Rows of the incidence matrix correspond to VertexList:
Vertices can be specified in Graph:
New in 8
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF