UndirectedGraph

UndirectedGraph[g]

gives an undirected graph from the directed graph g.

UndirectedGraph[{vw,}]

uses rules vw to specify the graph g.

Details and Options

  • The undirected edge uv is an edge in the resulting undirected graph if either of the directed edges uv or vu is an edge of g.
  • UndirectedGraph works with directed graphs, multigraphs, and mixed graphs.

Examples

open allclose all

Basic Examples  (1)

Give an undirected graph from a directed graph:

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

Scope  (7)

Properties & Relations  (4)

See Also

DirectedGraph  SimpleGraph  DirectedGraphQ  UndirectedGraphQ

Introduced in 2010
(8.0)
| Updated in 2015
(10.3)