VertexQ

VertexQ[g,v]

yields True if v is a vertex in the graph g and False otherwise.

Examples

open allclose all

Basic Examples  (2)

Test whether an item is a vertex of a graph:

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

Test items of various kinds:

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

Scope  (5)

Applications  (3)

Properties & Relations  (3)

Possible Issues  (1)

See Also

VertexList  VertexCount  VertexIndex  Graph  EdgeQ  GraphQ

Introduced in 2010
(8.0)