johnson.all.pairs.sp {RBGL} | R Documentation |
compute shortest path distance matrix for all pairs of nodes
johnson.all.pairs.sp(g)
g |
graph object for which edgeMatrix and edgeWeights are defined |
Uses BGL algorithm.
matrix of shortest path lengths, read from row node to col node
Vince Carey <stvjc@channing.harvard.edu>
BGL
bellman.ford.sp
, dag.sp
, dijkstra.sp
, sp.between
z <- fromGXL(file(system.file("dot/joh.gxl", package="RBGL"), open="r")) johnson.all.pairs.sp(z)