VertexList

VertexList[g]

gives the list of vertices for the graph g.

VertexList[g,patt]

gives a list of vertices that match the pattern patt.

VertexList[{vw,},]

uses rules vw to specify the graph g.

Details

  • VertexList is also known as nodes or actors.
  • VertexList returns the list of vertices in the order used by the graph g.

Examples

open allclose all

Basic Examples  (3)

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]=

Find all vertices that match a pattern:

In[1]:=
Click for copyable input
Out[1]=

Scope  (5)

Applications  (2)

Properties & Relations  (7)

See Also

VertexCount  EdgeList  AdjacencyMatrix  IncidenceMatrix  Graph

Introduced in 2010
(8.0)
| Updated in 2015
(10.3)