dag_longest_path

dag_longest_path(G)[source]

Returns the longest path in a DAG

Parameters:G (NetworkX DiGraph) – Graph
Returns:path – Longest path
Return type:list
Raises:NetworkXNotImplemented – If G is not directed