dijkstra.sp {RBGL}R Documentation

Dijkstra's shortest paths using boost C++

Description

dijkstra's shortest paths

Usage

dijkstra.sp(x,init.ind=1) # now x assumed to be Bioconductor graph graphNEL
sp.between(g,start,finish) # now x assumed to be Bioconductor graph graphNEL

Arguments

x instance of class graphNEL from Bioconductor graph class
g instance of class graphNEL from Bioconductor graph class
init.ind index (1 based) of where to start search
start character atom: node name for start of path
finish character atom: node name for end of path

Details

calls to boost dijkstra shortest paths

Value

list of two vectors of nodes, shortest distance to each node, and penultimate node of shortest path, and of the staring node, assumes 1-based counting

Note

Very preliminary

Author(s)

VJ Carey <stvjc@channing.harvard.edu>

Examples

dd <- fromGXL(file(system.file("XML/dijkex.gxl",package="RBGL")))
dijkstra.sp(dd)
dijkstra.sp(dd,2)
ospf <- fromGXL(file(system.file("XML/ospf.gxl",package="RBGL")))
dijkstra.sp(ospf,6)
sp.between(ospf, "RT6", "RT1")
if (interactive()) # see an error for query on nonexistent path
sp.between(ospf,"N10", "N13")

[Package Contents]