Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can easily find the list of all predecessors : just call the "distance_all_pairs" method, and you can then get all predecessors of x in a shortest u-v path as the list of all neighbors p of x such that d(u,p)+1+d(x,v).

Nathann

You can easily find the list of all predecessors : just call the "distance_all_pairs" method, and you can then get all predecessors of x in a shortest u-v path as the list of all neighbors p of x such that d(u,p)+1+d(x,v)d(u,p)+1+d(x,v)=d(u,v).

Nathann