DirectedGraph

DirectedGraph[g]

gives a directed graph from the undirected graph g.

DirectedGraph[g,conv]

gives a directed graph using the conversion conv.

DirectedGraph[{vw,},]

uses rules vw to specify the graph g.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Convert each undirected edge of the graph to both directions:

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

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

Scope  (6)

Applications  (1)

Properties & Relations  (3)

See Also

UndirectedGraph  AcyclicGraphQ  DirectedGraphQ  UndirectedGraphQ

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