GraphQ

GraphQ[g]

yields True if g is a valid Graph object and False otherwise.

Examples

open allclose all

Basic Examples  (2)

Test whether an object is a valid Graph object:

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

A Graphics object that contains a picture of a graph is not a valid Graph object:

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

Scope  (6)

Properties & Relations  (5)

Possible Issues  (1)

See Also

Graph  AdjacencyMatrix  IncidenceMatrix

Introduced in 2010
(8.0)