Dijkstra's shortest paths using boost C++
Description
dijkstra's shortest paths
Usage
1  dijkstra.sp(g,start=nodes(g)[1], eW=unlist(edgeWeights(g)))

Arguments
g 
instance of class graph 
start 
character: node name for start of path 
eW 
numeric: edge weights. 
Details
These functions are interfaces to the Boost graph library C++ routines for Dijkstra's shortest paths.
For some graph subclasses, computing the edge weights can be expensive.
If you are calling dijkstra.sp
in a loop, you can pass the edge
weights explicitly to avoid the edge weight creation cost.
Value
A list with elements:
distance 
The vector of distances from 
penult 
A vector of indices
(in 
. For example, if the
element one of this vector has value 10
, that means that the
predecessor of node 1
is node 10
. The next predecessor is
found by examining penult[10]
.
start 
The start node that was supplied in the call to

Author(s)
VJ Carey <stvjc@channing.harvard.edu>
References
Boost Graph Library ( www.boost.org/libs/graph/doc/index.html )
The Boost Graph Library: User Guide and Reference Manual; by Jeremy G. Siek, LieQuan Lee, and Andrew Lumsdaine; (AddisonWesley, Pearson Education Inc., 2002), xxiv+321pp. ISBN 0201729148
See Also
bellman.ford.sp
, dag.sp
, johnson.all.pairs.sp
, sp.between
Examples
1 2 3 4 5 6 7 8 9 10  con1 < file(system.file("XML/dijkex.gxl",package="RBGL"), open="r")
dd < fromGXL(con1)
close(con1)
dijkstra.sp(dd)
dijkstra.sp(dd,nodes(dd)[2])
con2 < file(system.file("XML/ospf.gxl",package="RBGL"), open="r")
ospf < fromGXL(con2)
close(con2)
dijkstra.sp(ospf,nodes(ospf)[6])
