Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

# dag_longest_path_length¶

dag_longest_path_length(G)[source]

Returns the longest path length in a DAG

Parameters: G (NetworkX DiGraph) – Graph path_length – Longest path length int NetworkXNotImplemented – If G is not directed