Description Usage Arguments Value Author(s) References Examples
This method calculates the compactness of a graph.
1 | compactness(g, dist = NULL, wien = NULL)
|
g |
a graphNEL object |
dist |
the Distance Matrix of the graph g (optional) |
wien |
the Wiener index of the graph g (optional) |
This returns the compactness of the graph.
Laurin Mueller
asdf
1 2 3 4 5 6 7 8 9 | library(graph)
library(RBGL)
set.seed(123)
g <- randomGraph(1:8, 1:5, 0.36, weights=FALSE)
#calculate Distance Matrix
mat.dist <- distanceMatrix(g)
compactness(g)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.