NetworkX

Previous topic

networkx.algorithms.cycles.simple_cycles

Next topic

networkx.algorithms.dag.topological_sort

Directed Acyclic GraphsΒΆ

Algorithms for directed acyclic graphs (DAGs).

topological_sort(G[, nbunch]) Return a list of nodes in topological sort order.
topological_sort_recursive(G[, nbunch]) Return a list of nodes in topological sort order.
is_directed_acyclic_graph(G) Return True if the graph G is a directed acyclic graph (DAG) or False if not.