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:

A random direction:

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

Scope  (6)

The input is unchanged for directed graphs:

DirectedGraph works with undirected graphs:

Multigraphs:

Mixed graphs:

Use rules to specify the graph:

DirectedGraph works with large graphs:

Applications  (1)

Find strongly connected components in a random directed grid graph:

Highlight the components of size greater than 1:

Properties & Relations  (3)

A directed graph can be constructed by a list of DirectedEdge objects:

A graph is either undirected or directed:

A nonsymmetric adjacency matrix is interpreted to be a directed graph:

Use DirectedEdges->False to interpret it as an undirected graph:

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