floyd.warshall.all.pairs.sp {RBGL}R Documentation

compute shortest paths for all pairs of nodes

Description

compute shortest paths for all pairs of nodes

Usage

floyd.warshall.all.pairs.sp(g)

Arguments

g graph object with edge weights given

Details

Compute shortest paths between every pair of vertices for a dense graph.

The result is given as a distance matrix.

For a sparse matrix, use johnson.all.pairs.sp instead.

See documentation on these algorithms in Boost Graph Library for more details.

Value

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

Note

Author(s)

Li Long <li.long@isb-sib.ch>

References

Boost Graph Library by Siek et al.

See Also

johnson.all.pairs.sp

Examples

coex <- fromGXL(file(system.file("XML/conn.gxl", package="RBGL"), open="r"))
floyd.warshall.all.pairs.sp(coex)

[Package RBGL version 1.10.0 Index]