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` | graph object for which edgeMatrix and edgeWeights are defined

### Details

Uses BGL algorithm.

### 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

`bellman.ford.sp`, `dag.sp`, `dijkstra.sp`, `sp.between`

### Examples

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

[Package RBGL version 1.10.0 Index]