Skip to content

VertexList ​

The vertices of a Graph, in first-appearance order.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageVertexList✓
VertexList(g)every vertex of gg, in the order Graph's doc describes.
Typed signatures
TypePackageApplies
(value) -> list<any>combinatoricsalways

Domain: Collections

Examples

1 more kept as data, checked against the oracles
Basic #

Vertices of a path, in first-appearance order

live ↗
InVertexList(Graph([UndirectedEdge(3,1),UndirectedEdge(1,2)]))\mathrm{VertexList}(\mathrm{Graph}(\bigl\lbrack\mathrm{UndirectedEdge}(3, 1), \mathrm{UndirectedEdge}(1, 2)\bigr\rbrack))Out[3,1,2]\bigl\lbrack3, 1, 2\bigr\rbrack
Properties #

A single-vertex graph has one vertex

live ↗
InLength(VertexList(g))\mathrm{Length}(\mathrm{VertexList}(g))Out11

A label that isn't among the vertices is not found, so the position list is empty

live ↗
InPosition(VertexList(g),c)\mathrm{Position}(\mathrm{VertexList}(g), \text{c})Out[]\bigl\lbrack\bigr\rbrack
About
Examples4
Checked againstWolfram Language 4 agree
CrosswalkWolfram Language

See also: Graph, EdgeList, VertexCount