Learn R Programming

QuACN (version 1.8.0)

compactness: Compactness

Description

This method calculates the compactness of a graph.

Usage

compactness(g, dist = NULL, wien = NULL)

Arguments

g
a graphNEL object
dist
the Distance Matrix of the graph g (optional)
wien
the Wiener index of the graph g (optional)

Value

References

asdf

Examples

Run this code
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)

Run the code above in your browser using DataLab