distanceMatrix: Distance Matrix

Description Usage Arguments Details Value Note Author(s) References Examples

Description

This method calculates the distance Matrix of a given graph.

Usage

1
distanceMatrix(g, keep.weights=FALSE)

Arguments

g

The graphNEL object for which the distance matrix will be calculated.

keep.weights

A flag indicating whether weights should be considered when performing the conversion (DEFAULT= FALSE). currently ignored, added for later development

Details

This method returns the distance Matrix of a given graph. If the graph is weighted it will be treated as if it was an unweighted graph.

Value

A distance matrix with dimensions V(g) x V(g).

Note

Currently we ignore the edge weight information when calculating the distance matrix. This will most likely change in future versions.

Author(s)

Laurin Mueller, Karl Kugler

References

F. Harary, Graph Theory, Addison-Wesley series in mathematics, Perseus Books, 1994.

Examples

1
2
3
4
5
library(RBGL)
set.seed(123)
g <- randomGraph(1:8, 1:5, 0.36, weights=FALSE)

distanceMatrix(g)


Search within the QuACN package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.