Module dag_algo

Source
Expand description

Module for algorithms that work on DAGs.

Enums§

TopologicalSortError
An error enumeration returned by topological sort functions.

Functions§

collect_bicolor_runs
Collect runs that match a filter function given edge colors.
collect_runs
Collect runs that match a filter function
layers
Return an iterator of graph layers
lexicographical_topological_sort
Get the lexicographical topological sorted nodes from the provided DAG.
longest_path
Calculates the longest path in a directed acyclic graph (DAG).
traversal_directions
Return a pair of petgraph::Direction values corresponding to the “forwards” and “backwards” direction of graph traversal, based on whether the graph is being traversed forwards (following the edges) or backward (reversing along edges). The order of returns is (forwards, backwards).