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:

The vertex list for a parametrically constructed graph:

Find all vertices that match a pattern:

Scope  (5)

VertexList works with undirected graphs:

Directed graphs:

Use rules to specify the graph:

Use patterns to select a subset of vertices:

VertexList works with large graphs:

Applications  (2)

Find all vertices with a given annotation:

Highlight the vertex by the vertex degree:

Properties & Relations  (7)

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:

AdjacencyGraph:

IncidenceGraph:

Wolfram Research (2010), VertexList, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexList.html (updated 2015).

Text

Wolfram Research (2010), VertexList, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexList.html (updated 2015).

BibTeX

@misc{reference.wolfram_2021_vertexlist, author="Wolfram Research", title="{VertexList}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/VertexList.html}", note=[Accessed: 22-October-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_vertexlist, organization={Wolfram Research}, title={VertexList}, year={2015}, url={https://reference.wolfram.com/language/ref/VertexList.html}, note=[Accessed: 22-October-2021 ]}

CMS

Wolfram Language. 2010. "VertexList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/VertexList.html.

APA

Wolfram Language. (2010). VertexList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexList.html