Skip to content

VertexIndex ​

The 1-based position of a vertex in a Graph's VertexList.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageVertexIndex✓
VertexIndex(g, v)the position of v in VertexList(g); unevaluated if v is not a vertex of g.
Typed signatures
TypePackageApplies
(value, any) -> integercombinatoricsalways

Domain: Collections

Examples

Basic #
live ↗
InVertexIndex(Graph([5,1,2],[UndirectedEdge(1,2)]),1)\mathrm{VertexIndex}(\mathrm{Graph}(\bigl\lbrack5, 1, 2\bigr\rbrack, \bigl\lbrack\mathrm{UndirectedEdge}(1, 2)\bigr\rbrack), 1)Out22
About
Examples1
Checked againstWolfram Language 1 agree
CrosswalkWolfram Language

See also: VertexList, VertexDegree