johnson.all.pairs.sp {RBGL}R Documentation

compute shortest path distance matrix for all pairs of nodes

Description

compute shortest path distance matrix for all pairs of nodes

Usage

johnson.all.pairs.sp(g)

Arguments

g g: graph object for which edgeMatrix and edgeWeights are defined

Details

uses BGL algorithm, currently cannot accept graph with more than 200 nodes.

Value

matrix of shortest path lengths, read from row node to col node

Note

Author(s)

Vince Carey <stvjc@channing.harvard.edu>

References

BGL

See Also

Examples

z <- fromGXL(file(system.file("dot/joh.gxl", package="RBGL")))
johnson.all.pairs.sp(z)

[Package RBGL version 1.3.7 Index]