Does anyone now how to modify "def dag_longest_path(G)" in https://networkx.github.io/documentation/networkx-1.10/_modules/networkx/algorithms/dag.html#dag_longest_path
to make it relative from a certain vertex I choose? I've been trying to code trace it for quite some time but I can't really seem to understand it, there are some functionalities like G.pred[node] which always come up with an empty set which doesnt make any sense.
post more akarin
Longest path from a certain vertex to what?
>>8368905
>>8368849
reject the for loop and instead only use the node you supply as a second argument?
>>8372828
Flip the weights to negative values, then use a shortest path algorithm
>>8374595
>>8368905 this anon asked for them
>>8374610
it's a meme you dip
>>8375079
I'll stay
>>8368849
Just write a recursive one, it would be easy especially in Python
>>8368849
Run dag_longest_path on the descendants of v.