Note

This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.

DAG Algorithms#

rustworkx.dag_longest_path(graph, /[, weight_fn])

Find the longest path in a DAG

rustworkx.dag_longest_path_length(graph, /)

Find the length of the longest path in a DAG

rustworkx.dag_weighted_longest_path(graph, ...)

Find the weighted longest path in a DAG

rustworkx.dag_weighted_longest_path_length(...)

Find the length of the weighted longest path in a DAG

rustworkx.is_directed_acyclic_graph(graph, /)

Check that the PyDiGraph or PyDAG doesn't have a cycle

rustworkx.layers(dag, first_layer, /[, ...])

Return a list of layers

rustworkx.transitive_reduction(graph, /)

Returns the transitive reduction of a directed acyclic graph

rustworkx.topological_generations(dag, /)

Return the topological generations of a DAG