DirectedGraphQ

DirectedGraphQ[g]

yields True if the graph g is a directed graph and False otherwise.

Details

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

Examples

open allclose all

Basic Examples  (2)

Test whether a graph is directed:

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

DirectedGraphQ gives False for inputs that are not directed graphs:

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

Scope  (6)

Properties & Relations  (3)

Possible Issues  (1)

See Also

UndirectedGraphQ  DirectedEdge  DirectedEdges  Graph

Introduced in 2010
(8.0)