8.1.10. networkx.algorithms.dag.dag_longest_path_length

networkx.algorithms.dag.dag_longest_path_length(G)[source]

Returns the longest path length in a DAG

Parameters:

G : NetworkX DiGraph

Graph

Returns:

path_length : int

Longest path length

Raises:

NetworkXNotImplemented

If G is not directed

See also

dag_longest_path