Directed Acyclic Graphs¶
Algorithms for directed acyclic graphs (DAGs).
Note that most of these functions are only guaranteed to work for DAGs. In general, these functions do not check for acyclic-ness, so it is up to the user to check for that.
|
Returns all nodes having a path to |
|
Returns all nodes reachable from |
Returns a generator of nodes in topologically sorted order. |
|
Returns a generator of _all_ topological sorts of the directed graph G. |
|
|
Returns a generator of nodes in lexicographically topologically sorted order. |
Returns True if the graph |
|
|
Returns True if |
|
Returns transitive closure of a directed graph |
|
Returns the transitive closure of a directed acyclic graph. |
Returns transitive reduction of a directed graph |
|
|
Generates antichains from a directed acyclic graph (DAG). |
|
Returns the longest path in a directed acyclic graph (DAG). |
|
Returns the longest path length in a DAG |
Returns a branching representing all (overlapping) paths from root nodes to leaf nodes in the given directed acyclic graph. |