compactness: Compactness

Description Usage Arguments Value Author(s) References Examples

View source: R/compactness.R

Description

This method calculates the compactness of a graph.

Usage

1
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

This returns the compactness of the graph.

Author(s)

Laurin Mueller

References

asdf

Examples

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)

QuACN documentation built on May 2, 2019, 5:46 p.m.