UndirectedGraphQ

UndirectedGraphQ[g]

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

Details

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

Examples

open allclose all

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]=

Scope  (6)

Properties & Relations  (5)

Possible Issues  (1)

See Also

GraphQ  DirectedGraphQ  UndirectedEdge  Graph

Introduced in 2010
(8.0)