Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

is_directed_acyclic_graph

is_directed_acyclic_graph(G)[source]

Return True if the graph G is a directed acyclic graph (DAG) or False if not.

Parameters:

G : NetworkX graph

A graph

Returns:

is_dag : bool

True if G is a DAG, false otherwise