DirectedGraph

DirectedGraph[g]
gives a directed graph from the undirected graph g.

DirectedGraph[g,conv]
gives a directed graph using the conversion conv.

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Convert each undirected edge of the graph to both directions:

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

A random direction:

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

A direction according to the vertex order in the vertex list:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2010
(8.0)
| Updated in 2014
(10.0)