NetworkX

Previous topic

networkx.algorithms.dag.topological_sort_recursive

Next topic

Distance Measures

networkx.algorithms.dag.is_directed_acyclic_graph

networkx.algorithms.dag.is_directed_acyclic_graph(G)

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