UndirectedGraphQ

UndirectedGraphQ[g]
yields True if the graph g is an undirected graph and False otherwise.

DetailsDetails

  • A graph is undirected if every edge in the graph is undirected.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Test whether a graph is undirected:

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

UndirectedGraphQ gives False for inputs that are not undirected graphs:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Introduced in 2010
(8.0)
Translate this page: