networkx/networkx — pull request #847 by matklad (2013-02-16 17:31:36+00:00)
Title: Add longest path algorithm for DAGs

Hello!

Looks like there is no longest path algorithm for DAGs in networkx, thought it's simple linear time dynamic programming, so here is my basic implementation.

If it is OK, I'll add some wrapper functions:

longest_path_in_dag(G, source, target)
longest_path_length_in_dag(G, source, target)
critical_path(G)