extractPath {RBGL} | R Documentation |
determine a path between two nodes in a graph,
using output of dijkstra.sp
.
extractPath(s, f, pens)
s |
s: index of starting node in nodes vector
of the graph from which pens was derived |
f |
f: index of ending node in nodes vector |
pens |
pens: predecessor index vector as returned
in the preds component of dijkstra.sp output |
Vince Carey <stvjc@channing.harvard.edu>
data(FileDep) dd <- dijkstra.sp(FileDep) extractPath(1,9,dd$pen)